SHA256
1
0
forked from pool/x3270
x3270/pr3270-memleak.patch
OBS User autobuild 884a97c9f0 Accepting request 24468 from Base:System
Copy from Base:System/x3270 based on submit request 24468 from user msmeissn

OBS-URL: https://build.opensuse.org/request/show/24468
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/x3270?expand=0&rev=8
2009-11-16 15:07:39 +00:00

20 lines
478 B
Diff

Index: pr3287-3.3/telnet.c
===================================================================
--- pr3287-3.3/telnet.c.orig
+++ pr3287-3.3/telnet.c
@@ -315,8 +315,13 @@ negotiate(int s, char *lu, char *assoc)
cstate != CONNECTED_3270 && /* TN3270 */
cstate != NOT_CONNECTED) { /* gave up */
- if (net_input(s) < 0)
+ if (net_input(s) < 0) {
+ Free(netrbuf);
+ Free(ibuf);
+ netrbuf = NULL;
+ ibuf = NULL;
return -1;
+ }
}
/* Success. */