Skip to content

Commit 379daa2

Browse files
committed
BUG/MINOR: removed memory leaks if no HTTP requests are mirrored
In case the program was compiled to use the cURL library and we did not specify a mirror url at program startup, the memory allocated for mirroring HTTP requests was not freed. Version of the program changed to v1.2.6.
1 parent 502efeb commit 379daa2

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.5
1+
1.2.6

src/.build-counter

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2387
1+
2388

src/spoa-message.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,12 @@ int spoa_msg_mirror(struct spoe_frame *frame, const char **buf, const char *end)
430430
}
431431
}
432432

433-
if (_ERROR(retval))
433+
if (_ERROR(retval) || _NULL(cfg.mir_url))
434434
mir_ptr_free(&mir);
435+
436+
#else
437+
438+
mir_ptr_free(&mir);
435439
#endif /* HAVE_LIBCURL */
436440

437441
SPOE_BUFFER_ADVANCE(retval);

0 commit comments

Comments
 (0)