Sfoglia il codice sorgente

Fix memory leak in LSUP_graph_store when output is NULL.

Stefano Cossu 3 anni fa
parent
commit
996902aad4
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  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;
 }