chiark / gitweb /
Replace free and nullify by mfree
authorDaniel Lockyer <thisisdaniellockyer@gmail.com>
Fri, 24 Nov 2017 09:37:50 +0000 (09:37 +0000)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Nov 2017 09:37:50 +0000 (09:37 +0000)
src/basic/cgroup-util.c

index 71b88f1d3b3d102e40cc26ac832cfecf939b5d12..b57f20cad9861ad3555afbb3bd0912eedcfabdf9 100644 (file)
@@ -2197,8 +2197,7 @@ int cg_get_keyed_attribute(const char *controller, const char *path, const char
         for (i = 0; keys[i]; i++) {
                 if (!values[i]) {
                         for (i = 0; keys[i]; i++) {
-                                free(values[i]);
-                                values[i] = NULL;
+                                values[i] = mfree(values[i]);
                         }
                         return -ENOENT;
                 }