X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=f5254ea731e9a67e823142cb34cbda0f9c95a93b;hb=95f71ac376826e2a8a3ee36f37c2daa087da4bbe;hp=7a8a7ac7a0f360e1247c2261e7916939c1481e05;hpb=b382d988c6f886f3a49483df9e3e36de0b6b0824;p=xboard.git diff --git a/xboard.c b/xboard.c index 7a8a7ac..f5254ea 100644 --- a/xboard.c +++ b/xboard.c @@ -3299,6 +3299,8 @@ void loadXIM(xim, xmask, filename, dest, mask) } } + fclose(fp); + /* create Pixmap of piece */ *dest = XCreatePixmap(xDisplay, DefaultRootWindow(xDisplay), w, h, xim->depth); @@ -4980,9 +4982,9 @@ Widget MiscCreate(name, text, mutable, callback, lines) XTranslateCoordinates(xDisplay, XtWindow(shellWidget), RootWindowOfScreen(XtScreen(shellWidget)), (bw_width - w) / 2, 0 - h / 2, &xx, &yy, &junk); -#endif /*!NOTDEF*/ x = xx; y = yy; +#endif /*!NOTDEF*/ if (y < 0) y = 0; /*avoid positioning top offscreen*/ j = 0; @@ -5945,6 +5947,7 @@ SendGameSelection(Widget w, Atom *selection, Atom *target, rewind(f); selection_tmp = XtMalloc(len + 1); count = fread(selection_tmp, 1, len, f); + fclose(f); if (len != count) { XtFree(selection_tmp); return False;