• Peter Eisentraut's avatar
    PL/Python: Fix potential NULL pointer dereference · e42e2f38
    Peter Eisentraut authored
    After d0aa965c, one error path in
    PLy_spi_execute_fetch_result() could result in the variable "result"
    being dereferenced after being set to NULL.  To fix that, just clear the
    resources right there and return early.
    
    Also add another SPI_freetuptable() call so that that is cleared in all
    error paths.
    
    discovered by John Naylor <jcnaylor@gmail.com> via scan-build
    e42e2f38
plpy_spi.c 13.6 KB