Module Name:    src
Committed By:   christos
Date:           Thu Nov 14 01:36:00 UTC 2013

Modified Files:
        src/external/ibm-public/postfix/dist/src/util: dict_sockmap.c

Log Message:
1102805: Memory leak


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
    src/external/ibm-public/postfix/dist/src/util/dict_sockmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/ibm-public/postfix/dist/src/util/dict_sockmap.c
diff -u src/external/ibm-public/postfix/dist/src/util/dict_sockmap.c:1.1.1.1 src/external/ibm-public/postfix/dist/src/util/dict_sockmap.c:1.2
--- src/external/ibm-public/postfix/dist/src/util/dict_sockmap.c:1.1.1.1	Wed Sep 25 15:06:37 2013
+++ src/external/ibm-public/postfix/dist/src/util/dict_sockmap.c	Wed Nov 13 20:36:00 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dict_sockmap.c,v 1.1.1.1 2013/09/25 19:06:37 tron Exp $	*/
+/*	$NetBSD: dict_sockmap.c,v 1.2 2013/11/14 01:36:00 christos Exp $	*/
 
 /*++
 /* NAME
@@ -334,11 +334,14 @@ DICT   *dict_sockmap_open(const char *ma
      * Separate the socketmap name from the socketmap server name.
      */
     saved_name = mystrdup(mapname);
-    if ((sockmap = split_at_right(saved_name, ':')) == 0)
-	return (dict_surrogate(DICT_TYPE_SOCKMAP, mapname,
-			       open_flags, dict_flags,
-			       "%s requires server:socketmap argument",
-			       DICT_TYPE_SOCKMAP));
+    if ((sockmap = split_at_right(saved_name, ':')) == 0) {
+	DICT *dp = dict_surrogate(DICT_TYPE_SOCKMAP, mapname,
+			          open_flags, dict_flags,
+			          "%s requires server:socketmap argument",
+			          DICT_TYPE_SOCKMAP);
+	myfree(saved_name);
+	return dp;
+    }
 
     /*
      * Use one reference-counted client handle for all socketmaps with the

Reply via email to