Svante Signell, le Thu 30 Aug 2012 20:30:24 +0200, a écrit :
> -    snprintf(fname, PATH_MAX, "%s/%s", directory, ent->d_name);
> +    len = strlen(directory) + 1 + strlen(ent->d_name) + 1;
> +    if (fname != NULL)
> +      free(fname);

free already checks for NULL pointer, so you don't need the if.

Apart from that it should be OK.

Samuel


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: 
http://lists.debian.org/[email protected]

Reply via email to