I'm using LibRaw to decode Sony ARW files.
One option of my code is to allow user to specify they'd like RGB output instead of RGGB.
When this option is chosen I call dcraw_process (result is LIBRAW_SUCCESS), followed by dcraw_make_mem_image with address of my result-code int.
This works great when memory is available.
However, when memory gets tight, this call appears to fail (returns NULL), but the error code is not populated (per "...If caller has passed not-NULL value as errorcode parameter, than *errorcode will be set to error code...").
I'm dealing with the problem, but thought I should report the issue. I was originally only relying on the result-code being LIBRAW_SUCCESS, and was failing to check return value.
Note: It almost looks like this may already be fixed, just not released.
I can't see how that newer code ^ can return NULL without filling in the error value.