[SSSD] [PATCH] Fix segmentation fault in test_io.

Jakub Hrozek jhrozek at redhat.com
Mon Apr 22 07:25:18 UTC 2013


On Tue, Apr 16, 2013 at 07:27:20PM +0530, Abhishek Singh wrote:
> Changes done. Please check the patch.
> 
> thanks,
> 

Hi Abishek

let's do one last change before I push the patch -- test the strdup
output for being non-NULL and then free the duplicate when it's not
needed:

    basec = strdup(get_filepath(path));
+   assert_non_null(basec);
    relativepath = basename(basec);
    fd = sss_openat_cloexec(dir_fd, relativepath, flags, &ret);
+   free(basec)


Thanks for the patch!



More information about the sssd-devel mailing list