33 lines
768 B
Diff
33 lines
768 B
Diff
|
|
From a4da9694c5e961e5dde1a0ad311177a9478903ff Mon Sep 17 00:00:00 2001
|
||
|
|
From: huyan <hu.huyan@huawei.com>
|
||
|
|
Date: Mon, 17 Jun 2019 12:29:36 +0800
|
||
|
|
Subject: [PATCH] backport remove resource leaks from nfs/xlog.c
|
||
|
|
|
||
|
|
---
|
||
|
|
support/nfs/xlog.c | 6 +++++-
|
||
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/support/nfs/xlog.c b/support/nfs/xlog.c
|
||
|
|
index f75a9ab..687d862 100644
|
||
|
|
--- a/support/nfs/xlog.c
|
||
|
|
+++ b/support/nfs/xlog.c
|
||
|
|
@@ -135,10 +135,14 @@ xlog_from_conffile(char *service)
|
||
|
|
struct conf_list_node *n;
|
||
|
|
|
||
|
|
kinds = conf_get_list(service, "debug");
|
||
|
|
- if (!kinds || !kinds->cnt)
|
||
|
|
+ if (!kinds || !kinds->cnt) {
|
||
|
|
+ free(kinds);
|
||
|
|
return;
|
||
|
|
+ }
|
||
|
|
TAILQ_FOREACH(n, &(kinds->fields), link)
|
||
|
|
xlog_sconfig(n->field, 1);
|
||
|
|
+
|
||
|
|
+ conf_free_list(kinds);
|
||
|
|
}
|
||
|
|
|
||
|
|
int
|
||
|
|
--
|
||
|
|
1.8.3.1
|
||
|
|
|