input/item: input_item_AddOption: do not add NULL on error
commitef7820be8d1790f04ee7ee5b10a30c83ded4c6c1
authorFilip Roséen <filip@atch.se>
Thu, 18 May 2017 10:19:29 +0000 (18 12:19 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 18 May 2017 16:05:59 +0000 (18 19:05 +0300)
tree7aadd5e3028421d4a91309dbd109af11f55eeb66
parent1739ed0fc8c6caeb9a816e7e7b1396ebf7eb2238
input/item: input_item_AddOption: do not add NULL on error

Implementations querying p_input->ppsz_options rely on each entry not
being NULL, meaning that we shall not add such values to the array.

These changes make sure that we check whether the strdup was
successful, and return an error if it was not.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
src/input/item.c