aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/digestauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/digestauth.c')
-rw-r--r--src/microhttpd/digestauth.c13
1 files changed, 11 insertions, 2 deletions
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)