log: fix theoretical pointer alignment problem
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 20 Aug 2014 18:02:45 +0000 (21:02 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 20 Aug 2014 18:02:45 +0000 (21:02 +0300)
lib/log.c

index c612e87..1e5094b 100644 (file)
--- a/lib/log.c
+++ b/lib/log.c
@@ -124,7 +124,7 @@ void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level )
 libvlc_log_t *libvlc_log_open( libvlc_instance_t *p_instance )
 {
     (void) p_instance;
-    return malloc(1);
+    return malloc(sizeof(libvlc_log_t));
 }
 
 void libvlc_log_close( libvlc_log_t *p_log )