Whamcloud - gitweb
LU-1884 build: fix 'resource leak' errors
[fs/lustre-release.git] / libcfs / libcfs / linux / linux-proc.c
index 5294e08..b093d12 100644 (file)
@@ -176,8 +176,10 @@ static int __proc_dobitmasks(void *data, int write,
                 }
         } else {
                 rc = cfs_trace_copyin_string(tmpstr, tmpstrlen, buffer, nob);
-                if (rc < 0)
-                        return rc;
+               if (rc < 0) {
+                       cfs_trace_free_string_buffer(tmpstr, tmpstrlen);
+                       return rc;
+               }
 
                 rc = libcfs_debug_str2mask(mask, tmpstr, is_subsys);
                 /* Always print LBUG/LASSERT to console, so keep this mask */