diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/oslib-posix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c index d8e5dcfede..6d70d9a706 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -299,9 +299,11 @@ void qemu_init_exec_dir(const char *argv0) return; } } - dir = dirname(p); + dir = g_path_get_dirname(p); pstrcpy(exec_dir, sizeof(exec_dir), dir); + + g_free(dir); } char *qemu_get_exec_dir(void) |