Переглянути джерело

Fix memory leak in LSUP_graph_store when output is NULL.

Stefano Cossu 3 роки тому
батько
коміт
996902aad4
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      src/graph.c

+ 1 - 0
src/graph.c

@@ -165,6 +165,7 @@ LSUP_graph_store (
     }
 
     if (dest_p) *dest_p = dest;
+    else LSUP_graph_free (dest);
 
     return LSUP_OK;
 }