[U-Boot] [PATCH 1/1] ubifs: no NULL check needed before free

Alex Sadovsky nable.maininbox at googlemail.com
Tue Nov 21 09:20:10 UTC 2017


Hi Heinrich and Heiko,

do you see anything strange in this code (it was more obvious before
the patch but it can still be spotted)? I should say that it's too
late to check for "file != NULL" after the "file->private_data"
dereference. Maybe it should look like this:
        if (file)
                kfree(file->private_data);
        free(file);
shouldn't it?

Cheers, Alex.


More information about the U-Boot mailing list