Gproject: fix memory leak due to mismatching deallocator

This leak was found by cppcheck.

Note: this partially covers #125.