git: 9front

Download patch

ref: 96ab880ce81f0ebef3f983ca3c52bc8f1ac943b0
parent: b1718f7eb274ab88f9a595c0bec71336b491c4ff
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon May 16 17:58:12 EDT 2016

ndb/cs: fix memory leak (charles forsyth)

--- a/sys/src/cmd/ndb/cs.c
+++ b/sys/src/cmd/ndb/cs.c
@@ -1241,7 +1241,8 @@
 						mf->replylen[mf->nreply] = strlen(cp);
 						mf->reply[mf->nreply++] = cp;
 						rv++;
-					}
+					} else
+						free(cp);
 				}
 			}
 			ndbfree(nt);
--