Skip to content

Commit a092d40

Browse files
Feng23yvolchkov
authored andcommitted
bug: a string created by "operator new" should destroyed by "delete"
This fixes a crash in case click is configured with --enable-dmalloc: "free" gets a parameter which is not the beginning address of the allocated memory.
1 parent cd826fb commit a092d40

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

minios/click.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ router_thread(void *thread_data)
163163
ri->f_stop = 1;
164164

165165
LOG("Driver stopped, closing router_thread");
166-
free(config);
166+
delete config;
167167
free(rid);
168168
}
169169

0 commit comments

Comments
 (0)