[PATCH] libpartutil: dereference pointer after checking it's not NULL

Danny Kukawka danny.kukawka at web.de
Wed Nov 28 10:34:14 PST 2007


On Dienstag, 20. November 2007, Doug Klima wrote:
> Danny Kukawka wrote:
> > On Freitag, 9. November 2007, Guillem Jover wrote:
> >> ---
> >>  partutil/partutil.c |   24 ++++++++++++++++++------
> >>  1 files changed, 18 insertions(+), 6 deletions(-)
> >
> > Commited, thanks.
> >
> > One point: shouldn't there be also a check if pe == NULL after call
> > pe=g_slist_nth_data(...) ? Something like the attached patch.
> >
> > Danny
>
> Yeah that looks more proper. Checking for NULL before using the pointer++
>
> Good eye Danny.

Commited it to git master.

Danny



More information about the hal mailing list