]> git.sur5r.net Git - i3/i3/blobdiff - src/util.c
Merge pull request #3365 from orestisf1993/DRAG_REVERT
[i3/i3] / src / util.c
index cd5ee03e49e607f689f265a95bcb9acc64cbdbcc..dc3444f7b6aa950be8b4696896ac55b1cc4033fc 100644 (file)
@@ -500,8 +500,8 @@ ssize_t slurp(const char *path, char **buf) {
     size_t n = fread(*buf, 1, stbuf.st_size, f);
     fclose(f);
     if ((ssize_t)n != stbuf.st_size) {
-        ELOG("File \"%s\" could not be read entirely: got %zd, want %zd\n", path, n, stbuf.st_size);
-        free(buf);
+        ELOG("File \"%s\" could not be read entirely: got %zd, want %" PRIi64 "\n", path, n, (int64_t)stbuf.st_size);
+        free(*buf);
         *buf = NULL;
         return -1;
     }