[Issue #3] Fixing leaked C array