fix leak
authorChristian Grothoff <christian@grothoff.org>
Fri, 17 Jan 2020 17:17:19 +0000 (18:17 +0100)
committerChristian Grothoff <christian@grothoff.org>
Fri, 17 Jan 2020 17:17:19 +0000 (18:17 +0100)
src/util/os_installation.c

index 990acede405e47be914f4622981a1ac296405cc0..dcd31dc2ccb39208ccd6f84c8e1c1d9f2e8fe8a7 100644 (file)
@@ -611,10 +611,10 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind)
                        DIR_SEPARATOR_STR "lib" DIR_SEPARATOR_STR,
                        (NULL != multiarch) ? multiarch : "",
                        dirname);
+      GNUNET_free (dirname);
       if (GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES))
       {
         GNUNET_free (execpath);
-        GNUNET_free (dirname);
         return tmp;
       }
       GNUNET_free (tmp);