lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev dev.17 patch 2 - HTDisplayPartial & Dired tweaks


From: Klaus Weide
Subject: lynx-dev dev.17 patch 2 - HTDisplayPartial & Dired tweaks
Date: Mon, 3 Jan 2000 09:58:26 -0600 (CST)

* Off by one correction in HTDisplayPartial line counting, as discussed
  with LP (I think).
* One invalid memory free (only reached in some (rare?) error case), two
  memory leaks removed in LYLocal.c.


Index: 1.23/WWW/Library/Implementation/HTFormat.c
--- 1.23/WWW/Library/Implementation/HTFormat.c Thu, 16 Dec 1999 19:41:42 -0600
+++ 2.36/WWW/Library/Implementation/HTFormat.c Tue, 28 Dec 1999 13:54:08 -0600
@@ -531,7 +531,7 @@
        */
        int Newline_partial = LYGetNewline();
 
-       if (((Newline_partial + display_lines) - 1 >= NumOfLines_partial)
+       if (((Newline_partial + display_lines) - 1 > NumOfLines_partial)
                /* current page not complete... */
        && (partial_threshold > 0 ?
                ((Newline_partial + partial_threshold) -1 <= 
HText_getNumOfLines()) :
Index: 1.23/src/LYLocal.c
--- 1.23/src/LYLocal.c Thu, 16 Dec 1999 19:41:42 -0600
+++ 2.36/src/LYLocal.c Tue, 28 Dec 1999 13:54:08 -0600
@@ -444,6 +444,7 @@
                    break;
                }
                ++count;
+               FREE(testpath);
            }
        }
     }
@@ -599,7 +600,6 @@
                srcpath = HTfullURL_toFile(cp);
 
                if (move_file(srcpath, savepath) < 0) {
-                   FREE(cp);
                    if (count == 0)
                        count = -1;
                    break;
@@ -2119,6 +2119,7 @@
            err = (LYExecv(INSTALL_PATH, args, tmpbuf) <= 0);
            FREE(args[src]);
            if (err) {
+               FREE(tmpbuf);
                FREE(tmpdest);
                return ((count == 0) ? -1 : count);
            }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]