Compare commits

...

3 Commits

Author SHA1 Message Date
kanjitalk755 293ef33a28
Merge pull request #196 from schinkelg/master
Small leaks / bug fixes
2024-03-30 09:36:36 +09:00
Ger Schinkel 076390e911 Fixed potential array out of bounds condition when break would never trigger. 2024-03-29 12:44:46 +01:00
Ger Schinkel db897d0d42 Memory leak in Linux etherhelpertool.c. 2024-03-29 12:08:11 +01:00
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ static int main_loop(int sd, int use_bpf)
outgoing = malloc(blen);
if (outgoing == NULL) {
free(outgoing);
free(incoming);
fprintf(stderr,
"%s: malloc() failed.\n",
exec_name);

View File

@ -2356,10 +2356,10 @@ static void update_display_dynamic(int ticker, driver_window *drv)
y2s = sm_uptd[ticker % 8];
y2a = 8;
for (i = 0; i < 6; i++) {
max_box = sm_no_boxes[i];
if (ticker % (2 << i))
break;
}
max_box = sm_no_boxes[i];
if (y2a) {
for (y1=0; y1<16; y1++) {