]> sigrok.org Git - libsigrok.git/commitdiff
demo: Use allocation for model string.
authorBert Vermeulen <redacted>
Fri, 14 Nov 2014 10:37:11 +0000 (11:37 +0100)
committerBert Vermeulen <redacted>
Fri, 14 Nov 2014 10:37:11 +0000 (11:37 +0100)
src/hardware/demo/demo.c

index b5cb276c9747f4011ed42ef8917abe1cf3866aa5..f06e879342cdcae2dea1946df4fd78f5f9e9ce71 100644 (file)
@@ -292,7 +292,7 @@ static GSList *scan(GSList *options)
 
        sdi = sr_dev_inst_new();
        sdi->status = SR_ST_ACTIVE;
-       sdi->model = "Demo device";
+       sdi->model = g_strdup("Demo device");
        sdi->driver = di;
 
        devc = g_malloc(sizeof(struct dev_context));