libfdisk: (gpt) partition name default to empty string

Just for backward compatibility, otherwise it's strange ;-)

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2020-02-25 12:39:26 +01:00
parent f4189a087a
commit ce8985cc71
1 changed files with 1 additions and 4 deletions

View File

@ -1647,10 +1647,7 @@ static char *encode_to_utf8(unsigned char *src, size_t count)
if (!dest)
return NULL;
if (ul_encode_to_utf8(UL_ENCODE_UTF16LE, dest, len, src, count) == 0) {
free(dest);
return NULL;
}
ul_encode_to_utf8(UL_ENCODE_UTF16LE, dest, len, src, count);
return (char *) dest;
}