components/fetchmail/patches/16390176.patch
author Rich Burridge <rich.burridge@oracle.com>
Wed, 01 Jul 2015 08:38:58 -0700
changeset 4580 5c702246a898
parent 1175 3b79e6aa942a
permissions -rw-r--r--
21351386 Hookup system-tests for libssh2

# This patch should be removed when we upgrade to 6.3.25; see the bug report
# for full context.
--- fetchmail/socket.c.orig	2012-08-13 13:02:41.000000000 -0700
+++ fetchmail/socket.c	2013-02-11 15:44:05.297674654 -0800
@@ -133,6 +133,7 @@
 	argvec = (char **)malloc(s);
 	if (!argvec)
 	{
+		free(plugin_copy);
 		report(stderr, GT_("fetchmail: malloc failed\n"));
 		return NULL;
 	}
@@ -186,6 +187,8 @@
 		if (outlevel >= O_VERBOSE)
 		    report(stderr, GT_("running %s (host %s service %s)\n"), plugin, host, service);
 		argvec = parse_plugin(plugin,host,service);
+		if (argvec == NULL)
+			_exit(EXIT_FAILURE);
 		execvp(*argvec, argvec);
 		report(stderr, GT_("execvp(%s) failed\n"), *argvec);
 		_exit(EXIT_FAILURE);