Package: irssi-plugin-xmpp / 0.53-1~bpo8+1

singpolyma-0103-Cleanup-on-error-you-doofus.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From bfc3d95ed6cc48ee08540f524dbbedc24d265d3f Mon Sep 17 00:00:00 2001
From: Stephen Paul Weber <singpolyma@singpolyma.net>
Date: Wed, 18 Mar 2015 10:37:56 -0500
Subject: [PATCH 03/10] Cleanup on error, you doofus

---
 src/core/tools.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/core/tools.c b/src/core/tools.c
index a98a72e..459c072 100644
--- a/src/core/tools.c
+++ b/src/core/tools.c
@@ -136,6 +136,7 @@ char *call_gpg_round(char *switches, char *input, char *input2, \
 					snip_data, round--);
 	}
 
+done:
 	if(tmp2_fd)   close(tmp2_fd);
 	if(tmp2_path) free(tmp2_path);
 	if(keyid)     close(pipefd[0]);
@@ -143,7 +144,8 @@ char *call_gpg_round(char *switches, char *input, char *input2, \
 
 	return output;
 pgp_error:
-	return NULL;
+	output = NULL;
+	goto done;
 }
 
 
-- 
2.1.4