Quote:
Do you think free(target_bmp.pixels); would work?



You could try, but I would not expect it to work properly. You don't know how memory allocation is done within the GS functions. I guess its not malloc (get memory from OS), but maybe an internal heap management. This could also be the reason why you got a "invalid pointer freed" error when exiting the game. Why do I think so? Because a message like this would be the expected behaviour if GS calls an internal (not OS!) free function for a pointer to memory which is allocated with standard malloc.
However - its just guessing.

Therefore I agree with Uhrwerk and the rest of the gang;) not to deal with GS internals. Even if you solve it, there is no guerantee that it works in all configurations or with the next update.
Have you done a performance test with bmap_blit? I think HeelX code should do the job perfectly.
If this is really to slow (how many copies do you produce??) you could try to "ask the developers" if there is a way to do it faster.