• Peter Eisentraut's avatar
    PL/Python: Fix potential NULL pointer dereference · 4c6744ed
    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.  Rearrange the code a bit to
    fix that.
    
    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
    
    ideas and review by Tom Lane
    4c6744ed
plpy_spi.c 13.6 KB