Commit c2421500 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

hdtest: Only show "**DEALLOCATED**" for NULL value but positive length

parent e9555989
......@@ -26,7 +26,7 @@
static void dump_val(json_t *jent, const char *key, uint8_t *val, size_t len)
{
if(val == NULL) {
if(val == NULL && len > 0) {
json_object_set_new(jent, key, json_string("**DEALLOCATED**"));
} else {
json_object_set_new(jent, key, json_pack("s#", val, len));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment