Free the newrule on strdup error.
Signed-off-by: Jan Safranek <[email protected]>
---
src/api.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/api.c b/src/api.c
index 71cec93..0acf787 100644
--- a/src/api.c
+++ b/src/api.c
@@ -700,6 +700,7 @@ static int cgroup_parse_rules(bool cache, uid_t muid,
if (len_procname) {
newrule->procname = strdup(procname);
if (!newrule->procname) {
+ free(newrule);
last_errno = errno;
ret = ECGOTHER;
goto close;
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it.
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel