mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
oslib: do not call g_strdup from qemu_get_exec_dir
Just return the directory without requiring the caller to free it. This also removes a bogus check for NULL in os_find_datadir and module_load_one; g_strdup of a static variable cannot return NULL. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@ -65,7 +65,7 @@ void os_setup_early_signal_handling(void)
|
||||
*/
|
||||
char *os_find_datadir(void)
|
||||
{
|
||||
return qemu_get_exec_dir();
|
||||
return g_strdup(qemu_get_exec_dir());
|
||||
}
|
||||
|
||||
void os_set_line_buffering(void)
|
||||
|
Reference in New Issue
Block a user