summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/trackerlogic.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/trackerlogic.c b/src/trackerlogic.c
index 4ba3a41..2673f95 100644
--- a/src/trackerlogic.c
+++ b/src/trackerlogic.c
@@ -577,8 +577,14 @@ int workstruct_init(struct ot_workstruct *ws, size_t inbuf_size) {
577#ifdef _DEBUG_HTTPERROR 577#ifdef _DEBUG_HTTPERROR
578 ws->debugbuf = malloc(G_DEBUGBUF_SIZE); 578 ws->debugbuf = malloc(G_DEBUGBUF_SIZE);
579#endif 579#endif
580 if (!ws->inbuf || !ws->outbuf) 580 if (!ws->inbuf || !ws->outbuf) {
581 free(ws->inbuf);
582 free(ws->outbuf);
583#ifdef _DEBUG_HTTPERROR
584 free(ws->debugbuf);
585#endif
581 return -1; 586 return -1;
587 }
582 588
583 /* Picking which peers to hand out starts here, so two workers seeded alike 589 /* Picking which peers to hand out starts here, so two workers seeded alike
584 would hand out alike */ 590 would hand out alike */