Fri Sep 4 20:51:07 2015 UTC ()
CID 461508: memory leak


(christos)
diff -r1.1 -r1.2 xsrc/external/mit/ctwm/dist/menus.c

cvs diff -r1.1 -r1.2 xsrc/external/mit/ctwm/dist/menus.c (expand / switch to unified diff)

--- xsrc/external/mit/ctwm/dist/menus.c 2015/09/03 22:16:33 1.1
+++ xsrc/external/mit/ctwm/dist/menus.c 2015/09/04 20:51:07 1.2
@@ -3522,26 +3522,27 @@ int ExecuteFunction(int func, void *acti @@ -3522,26 +3522,27 @@ int ExecuteFunction(int func, void *acti
3522 if (fd >= 0) 3522 if (fd >= 0)
3523 { 3523 {
3524 count = read(fd, buff, MAX_FILE_SIZE - 1); 3524 count = read(fd, buff, MAX_FILE_SIZE - 1);
3525 if (count > 0) 3525 if (count > 0)
3526 XStoreBytes(dpy, buff, count); 3526 XStoreBytes(dpy, buff, count);
3527 3527
3528 close(fd); 3528 close(fd);
3529 } 3529 }
3530 else 3530 else
3531 { 3531 {
3532 fprintf (stderr, "%s: unable to open file \"%s\"\n",  3532 fprintf (stderr, "%s: unable to open file \"%s\"\n",
3533 ProgramName, (char *)action); 3533 ProgramName, (char *)action);
3534 } 3534 }
 3535 free(action);
3535 break; 3536 break;
3536 3537
3537 case F_REFRESH: 3538 case F_REFRESH:
3538 { 3539 {
3539 XSetWindowAttributes attributes; 3540 XSetWindowAttributes attributes;
3540 unsigned long valuemask; 3541 unsigned long valuemask;
3541 3542
3542 valuemask = (CWBackPixel | CWBackingStore | CWSaveUnder); 3543 valuemask = (CWBackPixel | CWBackingStore | CWSaveUnder);
3543 attributes.background_pixel = Scr->Black; 3544 attributes.background_pixel = Scr->Black;
3544 attributes.backing_store = NotUseful; 3545 attributes.backing_store = NotUseful;
3545 attributes.save_under = False; 3546 attributes.save_under = False;
3546 w = XCreateWindow (dpy, Scr->Root, 0, 0, 3547 w = XCreateWindow (dpy, Scr->Root, 0, 0,
3547 (unsigned int) Scr->rootw, 3548 (unsigned int) Scr->rootw,