summaryrefslogtreecommitdiff
path: root/src/lib/cdap_req.h
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-12-28 09:05:44 +0100
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-12-28 09:15:46 +0100
commit502e7bb39096f6ce7718c29d9616bbd0314d045e (patch)
treecfa8af4328890f3534adc17c1f1ee8be67331cc3 /src/lib/cdap_req.h
parent6d14473d4fd0629125d9a96d9292deb32ba7e0a8 (diff)
downloadouroboros-502e7bb39096f6ce7718c29d9616bbd0314d045e.tar.gz
ouroboros-502e7bb39096f6ce7718c29d9616bbd0314d045e.zip
lib: Fix race in destruction of cdap_req
If cdap_req_destroy was called while in REQ_DONE, cdap->state would be accessed in cdap_req_respond.
Diffstat (limited to 'src/lib/cdap_req.h')
-rw-r--r--src/lib/cdap_req.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/cdap_req.h b/src/lib/cdap_req.h
index 9d5cb0c8..b2ded060 100644
--- a/src/lib/cdap_req.h
+++ b/src/lib/cdap_req.h
@@ -31,7 +31,8 @@
#include <pthread.h>
enum creq_state {
- REQ_INIT = 0,
+ REQ_NULL = 0,
+ REQ_INIT,
REQ_PENDING,
REQ_RESPONSE,
REQ_DONE,