projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac9b910
)
server: malloc/free fix
author
Jens Axboe
<axboe@kernel.dk>
Sat, 1 Oct 2011 20:26:42 +0000
(16:26 -0400)
committer
Jens Axboe
<axboe@kernel.dk>
Sat, 1 Oct 2011 20:26:42 +0000
(16:26 -0400)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
client.c
patch
|
blob
|
blame
|
history
server.c
patch
|
blob
|
blame
|
history
diff --git
a/client.c
b/client.c
index 63ecee6d11c93c315a35d1153c6933e326d63ad9..05bba38d60d54d1a8f9facb7433da41ab07d0a7c 100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-106,13
+106,11
@@
static int fio_client_connect(struct fio_client *client)
fd = socket(AF_INET, SOCK_STREAM, 0);
if (fd < 0) {
log_err("fio: socket: %s\n", strerror(errno));
- free(client);
return 1;
}
if (connect(fd, (struct sockaddr *) &client->addr, sizeof(client->addr)) < 0) {
log_err("fio: connect: %s\n", strerror(errno));
- free(client);
return 1;
}
@@
-278,6
+276,5
@@
int fio_handle_clients(void)
}
free(pfds);
-
return 0;
}
diff --git
a/server.c
b/server.c
index 8f93d2f8a2c6531de13cb8755272911b4813ff34..648758e2d8690175f9071b8eeaa681a86c735fa8 100644
(file)
--- a/
server.c
+++ b/
server.c
@@
-302,6
+302,7
@@
static int handle_connection(int sk)
break;
free(cmd);
+ cmd = NULL;
}
if (cmd)