unit-name: fix memory leak
authorDaniel Mack <daniel@zonque.org>
Thu, 30 Jul 2015 13:51:50 +0000 (15:51 +0200)
committerDaniel Mack <daniel@zonque.org>
Thu, 30 Jul 2015 13:51:50 +0000 (15:51 +0200)
commit8e542fcdc41db44895bbb7124909eea5fe2dea4d
tree24e2948c6d5fa47e2a28a8b1a3c612b347ec767c
parented070f131f774ff1f08ca36f832e5fe425da03dc
unit-name: fix memory leak

Fix a memory leak introduced by 2fc09a9c. 's' is used twice in this
function, and if free_and_strdup() fails, the pointer is left untouched.
src/basic/unit-name.c