tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: updates?



2016-07-23 3:10 GMT-07:00 Christos Zoulas <christos%astron.com@localhost>:

> In article <
> CA+SXE9u+2SNfNC7YoV3c_b52DTCbEk-9iE25+KwZoSh7Fnz4nw%mail.gmail.com@localhost>,
> Charles Cui  <charles.cui1984%gmail.com@localhost> wrote:
> >-=-=-=-=-=-
> >
> >Hi Christos,
> >Here is a improved patch based on your code review,
> >
> https://github.com/ycui1984/posixtestsuite/blob/master/patches/REALTIME_SIGNAL/0005-improve-error-checking-improve-based-on-code-review.patch
> >
> >I will send you the signal test later once I am ready.
>
> That looks good. Did you mean to goto discard; instead of goto out;?
>
I considered about this, it seems that if the variable kp is successfully
allocated,
we need to goto out to free kp first (which prevents memory leak).
But if we never allocate the variable kp, and encountered an error,
we need to goto discard, which does not free kp.
Make sense?

>
> christos
>
>


Home | Main Index | Thread Index | Old Index