changeset: 45:63737e166f58
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Mon Mar 12 01:33:51 2007 -0400
summary: Free data after you use it, not before.
diff -r 663597cefdd4 -r 63737e166f58 client.c
--- a/client.c Sat Mar 10 01:37:11 2007 -0500
+++ b/client.c Mon Mar 12 01:33:51 2007 -0400
@@ -93,7 +93,7 @@ ixp_client_create(IXPClient *c, uint dir
int
ixp_client_walk(IXPClient *c, uint newfid, char *filepath) {
- uint i;
+ int i;
char *wname[IXP_MAX_WELEM], *fp;
c->ifcall.type = TWALK;
@@ -105,9 +105,10 @@ ixp_client_walk(IXPClient *c, uint newfi
c->ifcall.nwname = ixp_tokenize(wname, IXP_MAX_WELEM, fp, '/'); // was "c->ifcall.name"
for(i = 0; i < c->ifcall.nwname; i++)
c->ifcall.wname[i] = wname[i];
- free(fp);
}
- return ixp_client_do_fcall(c);
+ i = ixp_client_do_fcall(c);
+ free(fp);
+ return i;
}
int
Received on Mon Mar 12 2007 - 06:37:35 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:16 UTC