|
@@ -519,7 +519,7 @@ static void htable_rpc_dump(rpc_t* rpc, void* c)
|
|
|
if (rpc->add(c, "{", &th) < 0)
|
|
|
{
|
|
|
rpc->fault(c, 500, "Internal error creating rpc");
|
|
|
- return;
|
|
|
+ goto error;
|
|
|
}
|
|
|
if(rpc->struct_add(th, "dd{",
|
|
|
"entry", i,
|
|
@@ -527,7 +527,7 @@ static void htable_rpc_dump(rpc_t* rpc, void* c)
|
|
|
"slot", &ih)<0)
|
|
|
{
|
|
|
rpc->fault(c, 500, "Internal error creating rpc");
|
|
|
- return;
|
|
|
+ goto error;
|
|
|
}
|
|
|
while(it)
|
|
|
{
|
|
@@ -535,7 +535,7 @@ static void htable_rpc_dump(rpc_t* rpc, void* c)
|
|
|
"item", &vh)<0)
|
|
|
{
|
|
|
rpc->fault(c, 500, "Internal error creating rpc");
|
|
|
- return;
|
|
|
+ goto error;
|
|
|
}
|
|
|
if(it->flags&AVP_VAL_STR) {
|
|
|
if(rpc->struct_add(vh, "SS",
|
|
@@ -543,7 +543,7 @@ static void htable_rpc_dump(rpc_t* rpc, void* c)
|
|
|
"value", &it->value.s)<0)
|
|
|
{
|
|
|
rpc->fault(c, 500, "Internal error adding item");
|
|
|
- return;
|
|
|
+ goto error;
|
|
|
}
|
|
|
} else {
|
|
|
if(rpc->struct_add(vh, "Sd",
|
|
@@ -551,7 +551,7 @@ static void htable_rpc_dump(rpc_t* rpc, void* c)
|
|
|
"value", (int)it->value.n))
|
|
|
{
|
|
|
rpc->fault(c, 500, "Internal error adding item");
|
|
|
- return;
|
|
|
+ goto error;
|
|
|
}
|
|
|
}
|
|
|
it = it->next;
|
|
@@ -559,6 +559,11 @@ static void htable_rpc_dump(rpc_t* rpc, void* c)
|
|
|
}
|
|
|
lock_release(&ht->entries[i].lock);
|
|
|
}
|
|
|
+
|
|
|
+ return;
|
|
|
+
|
|
|
+error:
|
|
|
+ lock_release(&ht->entries[i].lock);
|
|
|
}
|
|
|
|
|
|
rpc_export_t htable_rpc[] = {
|