projects
/
platform
/
upstream
/
nbd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6abdd46
)
nbd-server: zeroise hash table pointer after destroying the table
author
Dmitry V. Levin
<ldv@altlinux.org>
Thu, 21 Jun 2012 21:37:40 +0000
(
01:37
+0400)
committer
Wouter Verhelst
<w@uter.be>
Sat, 23 Jun 2012 23:38:34 +0000
(
01:38
+0200)
This is required to avoid accessing freed data later in
sigterm_handler.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
nbd-server.c
patch
|
blob
|
history
diff --git
a/nbd-server.c
b/nbd-server.c
index 7bf07a9b31f65a41e2bb59946b15ffd62ee89c97..2e008d87f7521de8be9381fd89396bb513ff7779 100644
(file)
--- a/
nbd-server.c
+++ b/
nbd-server.c
@@
-2266,6
+2266,7
@@
int serveloop(GArray* servers) {
}
/* child */
g_hash_table_destroy(children);
+ children = NULL;
for(i=0;i<servers->len;i++) {
serve=&g_array_index(servers, SERVER, i);
close(serve->socket);