nvvar: Fix creation without value
When a new nvvar is added without a value we want to get the value
from the corresponding globalvar. We do this by using nv_set which
ends up freeing the exact string that we passed into nv_set as
value. This results in a corrupt value. Fix this by assigning a
value manually without calling nv_set.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 441e9f5 commit d8dfe33e90931747868bac3e4d65af684b29fb47
@Sascha Hauer Sascha Hauer authored on 6 Apr 2017
Showing 1 changed file
View
common/globalvar.c