Fix: Memory leaks on error paths when exporting consumerd libdir in env
authorChristian Babeux <christian.babeux@efficios.com>
Thu, 28 Feb 2013 20:48:26 +0000 (15:48 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 21 Mar 2013 17:14:57 +0000 (13:14 -0400)
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/main.c

index f57a5c911d11095a7efbdc1a5ad8a87d400f3d9f..d88bafeb6e9255febe166687c8962c42ff6e69ab 100644 (file)
@@ -1885,6 +1885,7 @@ static pid_t spawn_consumerd(struct consumer_data *consumer_data)
                                ret = putenv(tmpnew);
                                if (ret) {
                                        ret = -errno;
+                                       free(tmpnew);
                                        goto error;
                                }
                        }
@@ -1929,6 +1930,7 @@ static pid_t spawn_consumerd(struct consumer_data *consumer_data)
                                ret = putenv(tmpnew);
                                if (ret) {
                                        ret = -errno;
+                                       free(tmpnew);
                                        goto error;
                                }
                        }
This page took 0.027873 seconds and 4 git commands to generate.