Fix a leak with a free before return. Reference: /n/sources/patch/applied/ndbipinfo-leak Date: Thu Sep 7 15:04:48 CES 2006 Signed-off-by: gabidiaz@gmail.com --- /sys/src/libndb/ndbipinfo.c Thu Sep 7 15:01:40 2006 +++ /sys/src/libndb/ndbipinfo.c Thu Sep 7 15:01:37 2006 @@ -181,8 +181,10 @@ ipstr = ndbgetvalue(db, &s, attr, val, "ip", &nt); if(ipstr == nil){ /* none found, make one up */ - if(strcmp(attr, "ip") != 0) - return nil; + if(strcmp(attr, "ip") != 0) { + ndbfree(f); + return nil; + } t = ndbnew("ip", val); t->line = t; t->entry = nil;