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:
parent
8e963d88f0
commit
8f38753043
@ -2501,7 +2501,7 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
|
||||
|
||||
case AS_DRAW_STRING:
|
||||
{
|
||||
char* string;
|
||||
char* string = NULL;
|
||||
int32 length;
|
||||
BPoint location;
|
||||
escapement_delta delta;
|
||||
@ -2521,7 +2521,8 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
|
||||
picture->AddFloat(delta.space);
|
||||
picture->AddFloat(delta.nonspace);
|
||||
picture->EndOp();
|
||||
|
||||
|
||||
free(string);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2549,6 +2550,9 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
|
||||
picture->AddData(ptList, ptCount * sizeof(BPoint));
|
||||
picture->EndOp();
|
||||
}
|
||||
delete[] opList;
|
||||
delete[] ptList;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user