Fix a memory leak in process_receipt_approval
Fix a memory leak in process_receipt_approval

We were leaking MySQL result resources.

You need to call mysql_free_result each time before another call to
mysql_store_result, otherwise you leak the previous one.

This was easily identifiable in top. Just repeatedly hitting Submit
on /approve_receipts/ would see the receiptomatic-www processes
increase in size.

With this fix, they max out at just over 2200K

Signed-off-by: Andrew Clayton <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@opentechlabs.co.uk>

ac000/receiptomatic