aboutsummaryrefslogtreecommitdiff
path: root/util/path.c
AgeCommit message (Collapse)AuthorFilesLines
2014-04-28init_paths: fix minor memory leakKirill Batuzov1-1/+3
Fields "name" (created with strdup in new_entry) and "pathname" (created with g_strdup_printf in new_entry) of pathelem struct should be freed before the whole struct is. Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-10-05util/path: Fix type which is longer than 8 bit for MinGWStefan Weil1-2/+2
While dirent->d_type is 8 bit for most systems, it is 32 bit for MinGW. Reducing it to 8 bit results in a compiler warning because the macro is_dir_maybe compares that 8 bit value with 32 bit constants. Using 'unsigned' instead of 'unsigned char' matches the declaration for MinGW and does not harm the other systems. MinGW-w64 is not affected: it does not declare d_type. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-01-19Replace non-portable asprintf by g_strdup_printfStefan Weil1-4/+1
g_strdup_printf already handles OOM errors, so some error handling in QEMU code can be removed. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-12build: move libqemuutil.a components to util/Paolo Bonzini1-0/+182
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>