Remove an unnecessary variable.

This commit is contained in:
Jordan Bancino 2022-09-30 12:48:33 -04:00
parent 8c2f70d82a
commit 90166882b0

View file

@ -45,7 +45,6 @@ MatrixHttpHandler(HttpServerContext * context, void *argp)
char *key; char *key;
char *val; char *val;
size_t i;
HashMap *response; HashMap *response;
@ -132,15 +131,16 @@ MatrixHttpHandler(HttpServerContext * context, void *argp)
JsonEncode(response, stream); JsonEncode(response, stream);
fprintf(stream, "\n"); fprintf(stream, "\n");
/* By this point, ArraySize(pathParts) should be 0, but just in /*
* case some elements remain, free them up now */ * By this point, there should be no path parts remaining, but if
for (i = 0; i < ArraySize(pathParts); i++) * there are, free them up now.
*/
while ((pathPart = MATRIX_PATH_POP(pathParts)) != NULL)
{ {
free(ArrayGet(pathParts, i)); free(pathPart);
} }
ArrayFree(pathParts); ArrayFree(pathParts);
JsonFree(response); JsonFree(response);
finish: finish: