- return;
- }
-
- /* build the response */
- resp = json_object_new_object();
- if(!resp || !j_add_string(resp, "added", wgt_info_desc(ifo)->idaver)) {
- json_object_put(resp);
+ else {
+ /* build the response */
+ resp = json_object_new_object();
+ if(!resp || !j_add_string(resp, "added", wgt_info_desc(ifo)->idaver))
+ jbus_reply_error_s(jreq, "\"out of memory but installed!\"");
+ else
+ jbus_reply_j(jreq, resp);
+
+ /* clean-up */