[openib-general] [PATCH] minor memory leak in libibverbs

ralphc at pathscale.com ralphc at pathscale.com
Mon Mar 6 13:03:41 PST 2006


I was browsing through the libibverbs code and found a minor memory
leak.  Here is the fix.

Signed-off-by: Ralph Campbell <ralphc at pathscale.com>

Index: openib/src/userspace/libibverbs/src/init.c
===================================================================
--- openib/src/userspace/libibverbs/src/init.c  (revision 5637)
+++ openib/src/userspace/libibverbs/src/init.c  (working copy)
@@ -111,6 +111,7 @@

        for (i = 0; i < so_glob.gl_pathc; ++i)
                load_driver(so_glob.gl_pathv[i]);
+       globfree(&so_glob);
 }

 static struct ibv_device *init_drivers(struct sysfs_class_device *verbs_dev)





More information about the general mailing list