• Kirill Smelkov's avatar
    libgolang: makechan: Clear whole allocated memory, not only sizeof(_chan) · f5b13f3f
    Kirill Smelkov authored
    We already clear whole chan memory (struct _chan + channel buffer that
    comes after it) on channel release. However, probably due to a thinko,
    on creation path only struct _chan without buffer was cleared.
    
    -> Be on the safe side and clear everything. Use zalloc helper to
    automatically avoid bugs when size of allocation != size of clear.
    f5b13f3f
libgolang.cpp 32 KB