From b099782023a108ee5b97c157f5927c929e2067c1 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 17 Jun 2015 00:22:46 +0000 Subject: [PATCH] iscsi-scstd: Fix a memory leak in the iSNS code Detected by Coverity. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6369 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/usr/config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/iscsi-scst/usr/config.c b/iscsi-scst/usr/config.c index f6017e5e7..0e988e195 100644 --- a/iscsi-scst/usr/config.c +++ b/iscsi-scst/usr/config.c @@ -1048,6 +1048,7 @@ static int config_isns_load(const char *config) if ((*p == '\0') || (*p == '#')) continue; if (!strcasecmp(p, ISCSI_ISNS_SERVER_ATTR_NAME)) { + free(isns_server); isns_server = strdup(config_sep_string(&q)); } else if (!strcasecmp(p, ISCSI_ISNS_ACCESS_CONTROL_ATTR_NAME)) { char *str = config_sep_string(&q);