free memory when we quit the tests. Free allocated string in the xcb apps

SVN revision: 25759
This commit is contained in:
doursse 2006-09-12 07:35:49 +00:00 committed by doursse
parent bce5edacbd
commit 691df94e56
3 changed files with 11 additions and 10 deletions

View File

@ -90,6 +90,7 @@ class_set (XCBConnection *c, XCBWINDOW win, const char *name, const char *class)
win, win,
rep->atom, encoding, 8, strlen (class_str), class_str); rep->atom, encoding, 8, strlen (class_str), class_str);
free (rep); free (rep);
free (class_str);
} }
int int

View File

@ -85,7 +85,7 @@ main(int argc, char **argv)
{ {
case ButtonPress: case ButtonPress:
if (ev.xbutton.button == 3) if (ev.xbutton.button == 3)
exit(0); goto exit;
#if 0 #if 0
if (!pause_me) if (!pause_me)
pause_me = 1; pause_me = 1;
@ -129,6 +129,12 @@ main(int argc, char **argv)
if (pause_me == 2) if (pause_me == 2)
usleep(100000); usleep(100000);
} }
exit:
setdown();
evas_free(evas);
XCloseDisplay(disp);
evas_shutdown(); evas_shutdown();
return 0; return 0;
} }

View File

@ -92,6 +92,7 @@ class_set (XCBConnection *c, XCBWINDOW win, const char *name, const char *class)
win, win,
rep->atom, encoding, 8, strlen (class_str), class_str); rep->atom, encoding, 8, strlen (class_str), class_str);
free (rep); free (rep);
free (class_str);
} }
int int
@ -186,15 +187,7 @@ main(int argc, char **argv)
XCBButtonPressEvent *ev = (XCBButtonPressEvent *)e; XCBButtonPressEvent *ev = (XCBButtonPressEvent *)e;
if (ev->detail.id == 3) if (ev->detail.id == 3)
{ goto exit;
setdown();
evas_free(evas);
free(e);
XCBDisconnect(conn);
evas_shutdown();
exit(0);
}
#if 0 #if 0
if (!pause_me) if (!pause_me)
pause_me = 1; pause_me = 1;
@ -253,6 +246,7 @@ main(int argc, char **argv)
usleep(100000); usleep(100000);
} }
exit:
setdown(); setdown();
evas_free(evas); evas_free(evas);
XCBDisconnect(conn); XCBDisconnect(conn);