Message ID | 20240516090340.61417-10-hadess@hadess.net |
---|---|
State | New |
Headers | show |
Series | Fix a number of static analysis issues #2 | expand |
diff --git a/tools/isotest.c b/tools/isotest.c index 58293133a304..fc1c26b23c3b 100644 --- a/tools/isotest.c +++ b/tools/isotest.c @@ -1457,8 +1457,11 @@ int main(int argc, char *argv[]) switch (mode) { case SEND: send_mode(filename, argv[optind + i], i, repeat); - if (filename && strchr(filename, ',')) - filename = strchr(filename, ',') + 1; + if (filename && strchr(filename, ',')) { + char *tmp = filename; + filename = strdup(strchr(filename, ',') + 1); + free(tmp); + } break; case RECONNECT: