tests: chip: fix potential segfault
authorBartosz Golaszewski <bartekgola@gmail.com>
Wed, 14 Jun 2017 05:48:00 +0000 (07:48 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Wed, 14 Jun 2017 05:48:00 +0000 (07:48 +0200)
commit859ffb7a9824f48fb9a0c37887339f2ce68edb5e
treea831429dc0ec272df69a4a097fb39539368d00db
parent6a26582df3103993e69ea2b9309929bc010f9ca2
tests: chip: fix potential segfault

The automatically cleaned up string is not initialized, but if
asprintf() failed, its contents would be undefined which could lead
to a segmentation fault.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
tests/tests-chip.c