ReadString() actually allocates memory... fixed that and another memory

leak


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19161 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2006-10-31 11:24:58 +00:00
parent 8e963d88f0
commit 8f38753043
+6 -2
View File
@@ -2501,7 +2501,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
case AS_DRAW_STRING: case AS_DRAW_STRING:
{ {
char* string; char* string = NULL;
int32 length; int32 length;
BPoint location; BPoint location;
escapement_delta delta; escapement_delta delta;
@@ -2521,7 +2521,8 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
picture->AddFloat(delta.space); picture->AddFloat(delta.space);
picture->AddFloat(delta.nonspace); picture->AddFloat(delta.nonspace);
picture->EndOp(); picture->EndOp();
free(string);
break; break;
} }
@@ -2549,6 +2550,9 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
picture->AddData(ptList, ptCount * sizeof(BPoint)); picture->AddData(ptList, ptCount * sizeof(BPoint));
picture->EndOp(); picture->EndOp();
} }
delete[] opList;
delete[] ptList;
break; break;
} }