Yelp/pygear — pull request #2 by paiweilai1984 (2014-10-02 18:46:02+00:00)
Title: Fixing memory leaks in pygear worker / adding missing Py_XDECREF.

Fixing memory leaks by adding missing Py_XDECREF to each function.
Note that several new references are not deallocated because of returning NULL.
Using goto and labels are recommended on many online documents because of similarity of try-catch structure.

I fixed all functions but one: _pygear_worker_function_mapper
There are few branches of conditional logic checks undefined and I am not sure if they should be returned as GEARMAN_SUCCESS or FAIL.