add: tgaRowData = NULL;
context: translate_from_bits1_to_tgabw(BPositionIO *inSource,	BPositionIO *outDestination, int32 bitsRowBytes,	TGAImageSpec &imagespec, bool brle){	uint8 tgaBytesPerPixel = 1;	int32 tgaRowBytes = (imagespec.width * tgaBytesPerPixel) +		(imagespec.width / 2);	uint32 tgapixrow = 0;	uint8 *tgaRowData = new uint8[tgaRowBytes];	if (!tgaRowData)		return B_ERROR;			uint8 *medRowData = new uint8[imagespec.width];	if (!medRowData) {		delete[] tgaRowData;		return B_ERROR;	}	uint8 *bitsRowData = new uint8[bitsRowBytes];	if (!bitsRowData) {		delete[] medRowData;		delete[] tgaRowData;		return B_ERROR;	}		// conversion function pointer, points to either	// RLE or normal TGA conversion function	status_t (*convert_to_tga)(uint8 *pbits, uint8 *ptga,		color_space fromspace, uint16 width, const color_map *pmap,		int32 bitsBytesPerPixel);			if (brle)		convert_to_tga = pix_bits_to_tgarle;	else		convert_to_tga = pix_bits_to_tga;			ssize_t rd = inSource->Read(bitsRowData, bitsRowBytes);	while (rd == bitsRowBytes) {		uint32 tgapixcol = 0;		for (int32 i = 0; (tgapixcol < imagespec.width) && 			(i < bitsRowBytes); i++) {			// process each byte in the row			uint8 pixels = bitsRowData[i];			for (uint8 compbit = 128; (tgapixcol < imagespec.width) &&				compbit; compbit >>= 1) {				// for each bit in the current byte, convert to a TGA palette				// index and store that in the tgaRowData				if (pixels & compbit)					// black					medRowData[tgapixcol] = 0;				else					// white					medRowData[tgapixcol] = 255;				tgapixcol++;			}		}				status_t bytescopied;		bytescopied = convert_to_tga(medRowData, tgaRowData, B_GRAY8,			imagespec.width, NULL, 1);						outDestination->Write(tgaRowData, bytescopied);		tgapixrow++;		// if I've read all of the pixel data, break		// out of the loop so I don't try to read 		// non-pixel data		if (tgapixrow == imagespec.height)			break;		rd = inSource->Read(bitsRowData, bitsRowBytes);	} // while (rd == bitsRowBytes)		delete[] bitsRowData;	delete[] medRowData;	delete[] tgaRowData;	return B_OK;}