From: Matt Birkholz Date: Wed, 8 Jun 2016 22:27:04 +0000 (-0700) Subject: x11/x11base.scm (x-get-window-property): Init data-return. X-Git-Tag: mit-scheme-pucked-9.2.12~261^2~25 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=de05841d69e993140141b0fb9ac5f3298267052c;p=mit-scheme.git x11/x11base.scm (x-get-window-property): Init data-return. Avoid freeing a bogus pointer when cleaning up. --- diff --git a/src/x11/x11base.scm b/src/x11/x11base.scm index f493d6311..bcdc05cf1 100644 --- a/src/x11/x11base.scm +++ b/src/x11/x11base.scm @@ -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!)