summaryrefslogtreecommitdiffstats
path: root/perl/Guestfs.xs
diff options
context:
space:
mode:
Diffstat (limited to 'perl/Guestfs.xs')
-rw-r--r--perl/Guestfs.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs
index 27e03d06..5ce5def1 100644
--- a/perl/Guestfs.xs
+++ b/perl/Guestfs.xs
@@ -68,7 +68,7 @@ XS_unpack_charPtrPtr (SV *arg) {
croak ("array reference expected");
av = (AV *)SvRV (arg);
- ret = malloc (av_len (av) + 1 + 1);
+ ret = malloc ((av_len (av) + 1 + 1) * sizeof (char *));
if (!ret)
croak ("malloc failed");