fix leak
This commit is contained in:
parent
f38a56d3ff
commit
73d107b53d
@ -339,10 +339,16 @@ proceed_with_handler (const struct TEH_RequestHandler *rh,
|
|||||||
upload_data_size,
|
upload_data_size,
|
||||||
&root);
|
&root);
|
||||||
if (GNUNET_SYSERR == res)
|
if (GNUNET_SYSERR == res)
|
||||||
|
{
|
||||||
|
GNUNET_assert (NULL == root);
|
||||||
return MHD_NO; /* bad upload, could not even generate error */
|
return MHD_NO; /* bad upload, could not even generate error */
|
||||||
|
}
|
||||||
if ( (GNUNET_NO == res) || (NULL == root) )
|
if ( (GNUNET_NO == res) || (NULL == root) )
|
||||||
|
{
|
||||||
|
GNUNET_assert (NULL == root);
|
||||||
return MHD_YES; /* so far incomplete upload or parser error */
|
return MHD_YES; /* so far incomplete upload or parser error */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
char d[ulen];
|
char d[ulen];
|
||||||
@ -381,6 +387,8 @@ proceed_with_handler (const struct TEH_RequestHandler *rh,
|
|||||||
rh->url,
|
rh->url,
|
||||||
url);
|
url);
|
||||||
GNUNET_break_op (0);
|
GNUNET_break_op (0);
|
||||||
|
if (NULL != root)
|
||||||
|
json_decref (root);
|
||||||
return TALER_MHD_reply_with_error (connection,
|
return TALER_MHD_reply_with_error (connection,
|
||||||
MHD_HTTP_NOT_FOUND,
|
MHD_HTTP_NOT_FOUND,
|
||||||
TALER_EC_WRONG_NUMBER_OF_SEGMENTS,
|
TALER_EC_WRONG_NUMBER_OF_SEGMENTS,
|
||||||
|
Loading…
Reference in New Issue
Block a user