Commit d503698b authored by Christophe Fergeau's avatar Christophe Fergeau Committed by Jonathan Beck

add missing break; in switch statement

The 2nd missing break was harmless since it fell through the default: case
which has a break, but it makes things more robust if we were ever to add
new cases to this switch. The 1st missing break; was causing warnings in
valgrind since we ended up calling strdup on a memory zone not containing
a \0 character.
parent 7a136312
......@@ -182,9 +182,11 @@ static void plist_copy_node(GNode * node, gpointer parent_node_ptr)
case PLIST_DATA:
newdata->buff = (uint8_t *) malloc(data->length);
memcpy(newdata->buff, data->buff, data->length);
break;
case PLIST_KEY:
case PLIST_STRING:
newdata->strval = strdup((char *) data->strval);
break;
default:
break;
}
......
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