mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
lib: Use g_malloc0 instead of g_malloc+memset
This commit is contained in:
@@ -47,8 +47,7 @@
|
||||
|
||||
struct fp_img *fpi_img_new(size_t length)
|
||||
{
|
||||
struct fp_img *img = g_malloc(sizeof(*img) + length);
|
||||
memset(img, 0, sizeof(*img));
|
||||
struct fp_img *img = g_malloc0(sizeof(*img) + length);
|
||||
fp_dbg("length=%zd", length);
|
||||
img->length = length;
|
||||
return img;
|
||||
|
||||
Reference in New Issue
Block a user