
Fix bug with allocating extra space for the memory buffers. There was
no check that the extra amount allocated was sufficient. For large
blocks of data (e.g. plotting the image of lena in example 20) this
could result in a buffer overflow and segementation fault. Example
20 now works again.

Also ensure that the buffer is properly freed once it is finished with
to prevent memory leak. (Leak found and checked using valgrind.)

svn path=/trunk/; revision=7225

FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot