Initialize dump buffer in case caller missed it

(Set an end to all the bug reports of applications failing
to do so.)
This commit is contained in:
Thomas Graf 2011-04-10 10:18:04 +02:00
parent 475dffa699
commit 2dbe7d7cfc

View file

@ -1000,6 +1000,9 @@ void dump_from_ops(struct nl_object *obj, struct nl_dump_params *params)
params->dp_pre_dump = 1;
}
if (params->dp_buf)
memset(params->dp_buf, 0, params->dp_buflen);
if (obj->ce_ops->oo_dump[type])
obj->ce_ops->oo_dump[type](obj, params);
}