]> git.sur5r.net Git - i3/i3/blobdiff - src/display_version.c
Fix memory leaks (#2560)
[i3/i3] / src / display_version.c
index c82610ed38ff2856975a8ae37838b947a4f23e1b..764ee753177f1875a5de4fdd65827a19fadad985 100644 (file)
@@ -1,5 +1,3 @@
-#undef I3__FILE__
-#define I3__FILE__ "key_press.c"
 /*
  * vim:ts=4:sw=4:expandtab
  *
@@ -10,6 +8,8 @@
  *                    i3 --moreversion.
  *
  */
+#include "all.h"
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
@@ -17,7 +17,6 @@
 #include <sys/un.h>
 #include <fcntl.h>
 #include <time.h>
-#include "all.h"
 
 static bool human_readable_key, loaded_config_file_name_key;
 static char *human_readable_version, *loaded_config_file_name;
@@ -183,4 +182,7 @@ void display_running_version(void) {
 #endif
 
     yajl_free(handle);
+    free(reply);
+    free(pid_from_atom);
+    free(socket_path);
 }