On Mon, Apr 21, 2014 at 04:43, Dirk Engling wrote:
> On 21.04.14 01:13, Bob Beck wrote:
> 
>> this list is for diffs.  post them.  keep them reviewable - of
>> meaningful size and doing a certain thing.
>> (as opposed to this diff changes 15 things.. )
> 
> Find attached my patches for some memory leaks, use after frees and some
> minor house keeping as follows.

> memleak_realloc.patch
> * fix memory leak in a2i_ASN1_ENUMERATED, a2i_ASN1_STRING
>   and a2i_ASN1_INTEGER, in case of goto err
> * use realloc instead of s ? realloc(s,l) : malloc(l)
> * Files: f_enum.c f_int.c f_string.c
> 
> double_free.patch
> * remove unnecessary NULL checks before free()
> * fix double free in d2i_ASN1_bytes by setting ret->data = NULL
>   after free, before potential goto err;

Thanks. Both of these diffs definitely qualify as doing two things at
once. It would be nice to see one diff that changes all the realloc
calls, one diff that deletes all the NULL before free, one diff that
fixes concrete errors like double free/memory leak, etc. And similarly
for all the rest.

Break diffs down by function, not file. I noticed three different
diffs all removed NULL checks before free. That should be a single
diff for all affected files.

Also, can you include diffs inline please? One diff per email. Maybe
just one or two emails to start, then try sending the rest after we
see how that goes?

Reply via email to