>>> Andy Grover <agro...@redhat.com> schrieb am 07.10.2014 um 18:56 in Nachricht
<54341b2c.1090...@redhat.com>:
> On 10/06/2014 11:13 PM, Ulrich Windl wrote:
>>>>> Andy Grover <agro...@redhat.com> schrieb am 06.10.2014 um 18:36 in 
>>>>> Nachricht
>> <1412613374-5752-3-git-send-email-agro...@redhat.com>:
>>> Signed-off-by: Andy Grover <agro...@redhat.com>
>>> ---
>>>   usr/iscsiadm.c | 5 ++---
>>>   1 file changed, 2 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
>>> index f886d39..0cdc1bb 100644
>>> --- a/usr/iscsiadm.c
>>> +++ b/usr/iscsiadm.c
>> ...
>>> @@ -2251,8 +2251,7 @@ static int exec_host_stats_op(int op, int info_level,
>>> uint32_t host_no)
>>>     ipc->ctldev_close();
>>>
>>>   exit_host_stats:
>>> -   if (req_buf)
>>> -           free(req_buf);
>>> +   free(req_buf);
>>>     return rc;
>>>   }
>>
>> Are you sure it's always safe to free(NULL)? I know systems where you get a 
> core dump (SIGSEGV)...
>>
>> Regards,
>> Ulrich
> 
> Are they Linux systems? The man page for free(3) on my box says if ptr 
> is NULL, no operation is performed.

I looked it up: You are right: The C standard says no action is performed when 
passing a NULL pointer to free().

> 
> Regards -- Andy
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "open-iscsi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to open-iscsi+unsubscr...@googlegroups.com.
> To post to this group, send email to open-iscsi@googlegroups.com.
> Visit this group at http://groups.google.com/group/open-iscsi.
> For more options, visit https://groups.google.com/d/optout.



-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-iscsi+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to