aboutsummaryrefslogtreecommitdiff
path: root/src/netnuke.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2010-12-07 17:41:39 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2010-12-07 17:41:39 -0500
commita70b36f98f42924c36d6b14cd10fb874d6a8c779 (patch)
tree8d80bcec0cfc5fca91ecd0f9b137b0fca720b5db /src/netnuke.c
parent2dfd49894f8638f166654885081a24228d7b41c8 (diff)
downloadNetNuke2-a70b36f98f42924c36d6b14cd10fb874d6a8c779.tar.gz
Added missing mutex init/destroy (should have crashed, but never did...)
Diffstat (limited to 'src/netnuke.c')
-rw-r--r--src/netnuke.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/netnuke.c b/src/netnuke.c
index 7ff94bc..4527276 100644
--- a/src/netnuke.c
+++ b/src/netnuke.c
@@ -269,6 +269,7 @@ int main(int argc, char* argv[])
COM(self, "Initializing mutex\n");
pthread_mutex_init(&lock_global, NULL);
+ pthread_mutex_init(&lock_write, NULL);
COM(self, "Generating threads\n");
/* If the operator wants to preserve the first device */
@@ -316,6 +317,7 @@ int main(int argc, char* argv[])
COM(self, "Destroying mutex\n");
pthread_mutex_destroy(&lock_global);
+ pthread_mutex_destroy(&lock_write);
COM(self, "Total bytes written: %lu\n", total_written_bytes);
/* Close urandom */