[ReviewFix] get_pixbuf_from_file: Free memory on error return

This commit is contained in:
Jonas Berlin 2019-12-03 20:27:31 +02:00
parent 364bce1ed0
commit 39c97e28f6

View File

@ -175,6 +175,7 @@ GdkPixbuf *get_pixbuf_from_file(const char *filename)
if (!gdk_pixbuf_get_file_info (path, &w, &h)) { if (!gdk_pixbuf_get_file_info (path, &w, &h)) {
LOG_W("Failed to load image info for %s", filename); LOG_W("Failed to load image info for %s", filename);
g_free(path);
g_error_free(error); g_error_free(error);
return NULL; return NULL;
} }