shithub: riscv

Download patch

ref: 7468752ea24a9b9a4c2930270a457ec790dced15
parent: 8c837c7bf6e096b9d0c055b47df6f4f3be0c8375
author: cinap_lenrek <[email protected]>
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);