• Daniel P. Berrange's avatar
    Only set ptr to nil for Connect object when free'ing · bd9dd147
    Daniel P. Berrange authored
    The virXXXXFree() methods do not in fact return the remaining
    reference count for the object - they always return 0. So we
    cannot set 'ptr' to nil when calling Free() on a Go level object.
    
    The virConnectClose() method, however, is an exception as it
    returns 1 if references remain, 0 if no references remain.
    So we should be setting 'ptr' to nil for the Connect object.
    Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
    bd9dd147
secret.go 4.35 KB