diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/microhttpd/digestauth.c | 13 |
2 files changed, 14 insertions, 2 deletions
@@ -1,3 +1,6 @@ | |||
1 | Thu Jun 4 13:37:05 CEST 2015 | ||
2 | Fixing memory leak in digest authentication. -AW | ||
3 | |||
1 | Wed Jun 03 21:23:47 CEST 2015 | 4 | Wed Jun 03 21:23:47 CEST 2015 |
2 | Add deprecation compiler messages for deprecated functions | 5 | Add deprecation compiler messages for deprecated functions |
3 | and macros. -EG | 6 | and macros. -EG |
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c index 4cc7f61b..e69f58aa 100644 --- a/src/microhttpd/digestauth.c +++ b/src/microhttpd/digestauth.c | |||
@@ -508,7 +508,10 @@ check_argument_match (struct MHD_Connection *connection, | |||
508 | connection, | 508 | connection, |
509 | argp); | 509 | argp); |
510 | if (MHD_YES != test_header (connection, argp, NULL)) | 510 | if (MHD_YES != test_header (connection, argp, NULL)) |
511 | return MHD_NO; | 511 | { |
512 | free(argb); | ||
513 | return MHD_NO; | ||
514 | } | ||
512 | num_headers++; | 515 | num_headers++; |
513 | break; | 516 | break; |
514 | } | 517 | } |
@@ -527,10 +530,16 @@ check_argument_match (struct MHD_Connection *connection, | |||
527 | connection, | 530 | connection, |
528 | equals); | 531 | equals); |
529 | if (! test_header (connection, argp, equals)) | 532 | if (! test_header (connection, argp, equals)) |
530 | return MHD_NO; | 533 | { |
534 | free(argb); | ||
535 | return MHD_NO; | ||
536 | } | ||
537 | |||
531 | num_headers++; | 538 | num_headers++; |
532 | argp = amper; | 539 | argp = amper; |
533 | } | 540 | } |
541 | |||
542 | free(argb); | ||
534 | 543 | ||
535 | /* also check that the number of headers matches */ | 544 | /* also check that the number of headers matches */ |
536 | for (pos = connection->headers_received; NULL != pos; pos = pos->next) | 545 | for (pos = connection->headers_received; NULL != pos; pos = pos->next) |