Do not check `NULL` to call free(): free() accepts `NULL`
[babeltrace.git] / src / common / common.c
index ed1d1c277f687d614d3795698e5e29044888d8b6..d092768a147cf9a18bcabd001229d5966ff5fdfa 100644 (file)
@@ -49,7 +49,7 @@
 #include <sys/ioctl.h>
 #endif
 
-#define SYSTEM_PLUGIN_PATH     INSTALL_LIBDIR "/babeltrace2/plugins"
+#define SYSTEM_PLUGIN_PATH     BABELTRACE_PLUGINS_DIR
 #define HOME_ENV_VAR           "HOME"
 #define HOME_PLUGIN_SUBPATH    "/.local/lib/babeltrace2/plugins"
 
@@ -1115,9 +1115,7 @@ error:
                norm_path = NULL;
        }
 end:
-       if (tmp) {
-               free(tmp);
-       }
+       free(tmp);
        return norm_path;
 }
 #else
This page took 0.028236 seconds and 4 git commands to generate.