summaryrefslogtreecommitdiff
path: root/wmamixer.c
diff options
context:
space:
mode:
authorRoman Dobosz <gryf73@gmail.com>2015-08-11 21:20:02 +0200
committerRoman Dobosz <gryf73@gmail.com>2015-08-11 21:20:02 +0200
commit266aa500f7d5bc67e7fb78af24c0add51f755043 (patch)
tree7065d91b992fae32fe99fadedfb01b981bb78382 /wmamixer.c
parent8d9ae094f9c379d3060fea0f46de55c04339124e (diff)
downloadwmamixer-266aa500f7d5bc67e7fb78af24c0add51f755043.tar.gz
wmamixer-266aa500f7d5bc67e7fb78af24c0add51f755043.tar.bz2
wmamixer-266aa500f7d5bc67e7fb78af24c0add51f755043.zip
Fix possible memory issues
Diffstat (limited to 'wmamixer.c')
-rw-r--r--wmamixer.c2
1 files changed, 1 insertions, 1 deletions
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;
}