x11/x11base.scm (x-get-window-property): Init data-return.
authorMatt Birkholz <puck@birchwood-abbey.net>
Wed, 8 Jun 2016 22:27:04 +0000 (15:27 -0700)
committerMatt Birkholz <puck@birchwood-abbey.net>
Wed, 8 Jun 2016 22:27:04 +0000 (15:27 -0700)
Avoid freeing a bogus pointer when cleaning up.

src/x11/x11base.scm

index f493d63117de64f1a26deb2c318b0c7a49b00e78..bcdc05cf137e87060488525d02c27eb18feb0404 100644 (file)
@@ -752,7 +752,8 @@ USA.
            (alien-null! copy))))
 
     (define (init-data-return! copy)
-      ((ucode-primitive c-malloc 2) copy (c-sizeof "* char")))
+      ((ucode-primitive c-malloc 2) copy (c-sizeof "* char"))
+      (c->= copy "* char" 0))
 
     (let ((data-return (make-alien '(* char))))
       (add-alien-cleanup! data-return cleanup-data-return! init-data-return!)