struct blob_attr *sig, *attr;
struct list_data *data = priv;
int rem, rem2;
- void *t, *o;
+ void *t, *o=NULL;
if (!data->verbose) {
blobmsg_add_string(data->buf, NULL, obj->path);
if (!obj->signature)
return;
- if (data->add_object)
+ if (data->add_object) {
o = blobmsg_open_table(data->buf, obj->path);
+ if (!o)
+ return;
+ }
+
blob_for_each_attr(sig, obj->signature, rem) {
t = blobmsg_open_table(data->buf, blobmsg_name(sig));
rem2 = blobmsg_data_len(sig);
}
blobmsg_close_table(data->buf, t);
}
+
if (data->add_object)
blobmsg_close_table(data->buf, o);
}