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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user