Fix type mistake in blkid_handle allocation.

This commit is contained in:
Ondrej Kozina
2018-07-17 13:06:22 +02:00
committed by Milan Broz
parent 1b9148f12f
commit fe3ef6fc2e

View File

@@ -87,7 +87,7 @@ int blk_init_by_path(struct blkid_handle **h, const char *path)
{
int r = -ENOTSUP;
#ifdef HAVE_BLKID
struct blkid_handle *tmp = malloc(sizeof(*h));
struct blkid_handle *tmp = malloc(sizeof(*tmp));
if (!tmp)
return -ENOMEM;
@@ -110,7 +110,7 @@ int blk_init_by_fd(struct blkid_handle **h, int fd)
{
int r = -ENOTSUP;
#ifdef HAVE_BLKID
struct blkid_handle *tmp = malloc(sizeof(*h));
struct blkid_handle *tmp = malloc(sizeof(*tmp));
if (!tmp)
return -ENOMEM;