server: rest_api: Fix memory leak in slotmap post

We need to decrement the refcount on the json_req object.

Change-Id: I1a550eff76e6a72013ab47ef8f240a72d7a7d9cb
diff --git a/src/server/rest_api.c b/src/server/rest_api.c
index 969f672..abd46b9 100644
--- a/src/server/rest_api.c
+++ b/src/server/rest_api.c
@@ -309,7 +309,7 @@
 	struct slot_mapping slotmap, *map;
 	struct rspro_client_conn *conn;
 	json_error_t json_err;
-	json_t *json_req;
+	json_t *json_req = NULL;
 	int rc;
 
 	json_req = ulfius_get_json_body_request(req, &json_err);
@@ -341,10 +341,12 @@
 	pthread_rwlock_unlock(&srv->rwlock);
 
 
+	json_decref(json_req);
 	ulfius_set_empty_body_response(resp, 201);
 
 	return U_CALLBACK_COMPLETE;
 err:
+	json_decref(json_req);
 	ulfius_set_empty_body_response(resp, 400);
 	return U_CALLBACK_COMPLETE;
 }