Skip to content

Commit 6376c9a

Browse files
committed
Removed unnecessary malloc() at all
1 parent 2c74b61 commit 6376c9a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/drivers/win/memview.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,9 @@ void UndoLastPatch(){
297297
}
298298

299299
void GotoAddress(HWND hwnd) {
300-
char* gotoaddressstring = (char*)malloc(8);
300+
char gotoaddressstring[8];
301301
int gotoaddress;
302-
char* gototitle = (char*)malloc(18);
302+
char gototitle[18];
303303

304304
gotoaddressstring[0] = '\0';
305305
sprintf(gototitle, "%s%X%s", "Goto (0-", MaxSize-1, ")");
@@ -310,8 +310,6 @@ void GotoAddress(HWND hwnd) {
310310
SetHexEditorAddress(gotoaddress);
311311
}
312312
}
313-
free(gotoaddressstring);
314-
free(gototitle);
315313
}
316314

317315
void SetHexEditorAddress(int gotoaddress)

0 commit comments

Comments
 (0)