]> err.no Git - systemd/commitdiff
strv: fix three minor OOM-triggered memory leaks
authorLennart Poettering <lennart@poettering.net>
Sun, 14 Feb 2010 21:37:30 +0000 (22:37 +0100)
committerLennart Poettering <lennart@poettering.net>
Sun, 14 Feb 2010 21:37:30 +0000 (22:37 +0100)
strv.c

diff --git a/strv.c b/strv.c
index c4880c49caeec689a78d301da504d650fbc71c2d..25ea92c112c26e6170436e7b08dc71857dbc64f7 100644 (file)
--- a/strv.c
+++ b/strv.c
@@ -163,6 +163,8 @@ fail:
         for (k--; k >= r; k--)
                 free(*k);
 
+        free(r);
+
         return NULL;
 }
 
@@ -191,6 +193,8 @@ fail:
         for (k--; k >= r; k--)
                 free(*k);
 
+        free(r);
+
         return NULL;
 
 }
@@ -305,6 +309,8 @@ fail:
         for (k--; k >= r; k--)
                 free(*k);
 
+        free(r);
+
         return NULL;
 }