2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

util: set_program_name() can be called twice with different names.

Ex: ovstest.c

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Gurucharan Shetty
2014-05-12 14:55:46 -07:00
parent 144ccc021e
commit cf1e5c18c5

View File

@@ -461,7 +461,7 @@ set_program_name__(const char *argv0, const char *version, const char *date,
SetErrorMode(GetErrorMode() | SEM_NOGPFAULTERRORBOX);
if (program_name) {
return;
free(program_name);
}
basename = xmalloc(max_len);
_splitpath_s(argv0, NULL, 0, NULL, 0, basename, max_len, NULL, 0);