Add NULL-check, to silence a Coverity problem.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 18 Apr 2013 19:35:20 +0000 (22:35 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 18 Apr 2013 19:35:20 +0000 (22:35 +0300)
commit0175dfc578110e1a241f98afb1d21a882855defe
treedc52aeb4f1b63ddc525013393f152b00bab2bef3
parentfa2f7711d8d2b0cad4b66802e2c309a91ab0aeed
Add NULL-check, to silence a Coverity problem.

The problem is that if the loop above doesn't find a result set with
command tag "FETCH ...", res is left to point to an already-freed result
set, and we'll go ahead and call QR_set_withhold on the already-freed
struct. That can't happen in practice, because the backend does always
return a result set with "FETCH ..." command tag when a FETCH statement is
issued, but better safe than sorry.
statement.c