Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/ibm-public/postfix/dist/src/util 1102805: Memory leak



details:   https://anonhg.NetBSD.org/src/rev/35b8c6e1a43d
branches:  trunk
changeset: 791352:35b8c6e1a43d
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Nov 14 01:36:00 2013 +0000

description:
1102805: Memory leak

diffstat:

 external/ibm-public/postfix/dist/src/util/dict_sockmap.c |  15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diffs (29 lines):

diff -r 3f454818858a -r 35b8c6e1a43d external/ibm-public/postfix/dist/src/util/dict_sockmap.c
--- a/external/ibm-public/postfix/dist/src/util/dict_sockmap.c  Thu Nov 14 01:28:16 2013 +0000
+++ b/external/ibm-public/postfix/dist/src/util/dict_sockmap.c  Thu Nov 14 01:36:00 2013 +0000
@@ -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 @@
      * 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



Home | Main Index | Thread Index | Old Index