author | Sebastian Harl <sh@tokkee.org> | |
Sun, 1 Feb 2009 22:24:54 +0000 (23:24 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 1 Feb 2009 22:24:54 +0000 (23:24 +0100) | ||
commit | 8ce9aefcb31e8ae86747380813ac435e3c359c64 | |
tree | 0ca3639fc628a3130025f096c03595a4273ee606 | tree | snapshot |
parent | 75555c1cdc99e4b1efa4a9d664f189906e2c3427 | commit | diff |
dbi plugin: Fixed error handling in an inner loop.
The macro BAIL_OUT_CONTINUE() is used inside the loop iterating over the
result sets to clean up and continue with the next loop iteration. In two
cases this was used in a loop iterating over the instances and values lists
contained within that loop as well though. This would cause the memory that
was currently written to (the two target lists) to be freed and thus cause a
possible segfault. In any case it would leave behind inconsistent and most
probably uninitialized data. The usage of that macro has now been pulled out
of the inner loops.
The macro BAIL_OUT_CONTINUE() is used inside the loop iterating over the
result sets to clean up and continue with the next loop iteration. In two
cases this was used in a loop iterating over the instances and values lists
contained within that loop as well though. This would cause the memory that
was currently written to (the two target lists) to be freed and thus cause a
possible segfault. In any case it would leave behind inconsistent and most
probably uninitialized data. The usage of that macro has now been pulled out
of the inner loops.
src/dbi.c | diff | blob | history |