From 266aa500f7d5bc67e7fb78af24c0add51f755043 Mon Sep 17 00:00:00 2001 From: Roman Dobosz Date: Tue, 11 Aug 2015 21:20:02 +0200 Subject: [PATCH] Fix possible memory issues --- wmamixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wmamixer.c b/wmamixer.c index 7c0e00e..7e85437 100644 --- a/wmamixer.c +++ b/wmamixer.c @@ -312,7 +312,7 @@ void Selem_set_name(struct Selem *selem, const char *name, short int *count) { snprintf(new_name, sizeof(new_name), "%s%d", buf, *count); } - selem->name = new_name; + selem->name = strdup(new_name); *count = *count + 1; }