summaryrefslogtreecommitdiff
path: root/mbone
diff options
context:
space:
mode:
authorBill Fenner <fenner@FreeBSD.org>1998-02-19 19:03:15 +0000
committerBill Fenner <fenner@FreeBSD.org>1998-02-19 19:03:15 +0000
commit2edf00cf6728d2f61cb29fec3265c440e7528d50 (patch)
treec5567a6336bbdf4449abb57cd0bd83aa16dce8a4 /mbone
parentFix color behavior with tk8.0 -- tk was setting the highlight color to black. (diff)
Fix memory leaks.
Notes
Notes: svn path=/head/; revision=9839
Diffstat (limited to 'mbone')
-rw-r--r--mbone/vat/files/patch-ae61
-rw-r--r--mbone/vic/files/patch-ag96
2 files changed, 157 insertions, 0 deletions
diff --git a/mbone/vat/files/patch-ae b/mbone/vat/files/patch-ae
new file mode 100644
index 000000000000..c6842ae25663
--- /dev/null
+++ b/mbone/vat/files/patch-ae
@@ -0,0 +1,61 @@
+--- Tcl.h.orig Sat Mar 16 13:14:34 1996
++++ Tcl.h Tue Dec 17 14:39:45 1996
+@@ -53,7 +53,8 @@
+ inline int dark() const { return (tcl_ == 0); }
+ inline Tcl_Interp* interp() const { return (tcl_); }
+ inline char* result() const { return (tcl_->result); }
+- inline void result(const char* p) { tcl_->result = (char*)p; }
++ inline void result(const char* p, Tcl_FreeProc* freeProc = TCL_STATIC)
++ { Tcl_SetResult(tcl_, (char *)p, freeProc); }
+ void resultf(const char* fmt, ...);
+ inline void CreateCommand(const char* cmd, Tcl_CmdProc* cproc,
+ ClientData cd = 0,
+--- source.cc.orig Thu Apr 4 07:05:45 1996
++++ source.cc Tue Dec 17 14:38:44 1996
+@@ -251,8 +251,7 @@
+ return (TCL_OK);
+ }
+ if (strcmp(argv[1], "addr") == 0) {
+- strcpy(wrk, InetNtoa(addr_));
+- tcl.result(wrk);
++ tcl.result(InetNtoa(addr_), TCL_DYNAMIC);
+ return (TCL_OK);
+ }
+ if (strcmp(argv[1], "srcid") == 0) {
+--- Tcl.cc.orig Tue Apr 2 20:53:27 1996
++++ Tcl.cc Tue Dec 17 15:45:30 1996
+@@ -162,6 +162,8 @@
+ Tcl& tcl = Tcl::instance();
+ if (!tcl.dark())
+ tcl.DeleteCommand(name_);
++ if (name_ != 0)
++ delete name_;
+ TclObject** p;
+ for (p = &all_; *p != this; p = &(*p)->next_)
+ ;
+@@ -197,8 +199,9 @@
+ void TclObject::setproc(const char* s)
+ {
+ Tcl& tcl = Tcl::instance();
+- if (name_ != 0 && !tcl.dark()) {
+- tcl.DeleteCommand(name_);
++ if (name_ != 0) {
++ if (!tcl.dark())
++ tcl.DeleteCommand(name_);
+ delete name_;
+ }
+ int n = strlen(s);
+--- sitebox.cc.orig 1997/01/07 22:48:27
++++ sitebox.cc 1997/01/07 23:27:35
+@@ -228,6 +228,10 @@
+
+ Site::~Site()
+ {
++ if (text_)
++ delete text_;
++ if (tag_)
++ delete tag_;
+ }
+
+ int Site::command(int argc, const char*const* argv)
+
diff --git a/mbone/vic/files/patch-ag b/mbone/vic/files/patch-ag
new file mode 100644
index 000000000000..b7c10c120ee8
--- /dev/null
+++ b/mbone/vic/files/patch-ag
@@ -0,0 +1,96 @@
+--- vw.cc.orig Mon Jul 22 13:12:31 1996
++++ vw.cc Tue Dec 17 16:35:57 1996
+@@ -248,8 +248,6 @@
+ /*
+ * Wrap segment in an ximage
+ */
+- image_ = XCreateImage(dpy_, Tk_Visual(tk), Tk_Depth(tk), ZPixmap,
+- 0, (char*)0, width_, height_, 8, 0);
+ image_->obdata = (char*)&shminfo_;
+ image_->data = shminfo_.shmaddr;
+ }
+--- Tcl.h.orig Sat Mar 16 13:14:34 1996
++++ Tcl.h Tue Dec 17 14:39:45 1996
+@@ -53,7 +53,8 @@
+ inline int dark() const { return (tcl_ == 0); }
+ inline Tcl_Interp* interp() const { return (tcl_); }
+ inline char* result() const { return (tcl_->result); }
+- inline void result(const char* p) { tcl_->result = (char*)p; }
++ inline void result(const char* p, Tcl_FreeProc* freeProc = TCL_STATIC)
++ { Tcl_SetResult(tcl_, (char *)p, freeProc); }
+ void resultf(const char* fmt, ...);
+ inline void CreateCommand(const char* cmd, Tcl_CmdProc* cproc,
+ ClientData cd = 0,
+--- source.cc.orig Thu Apr 4 07:05:45 1996
++++ source.cc Tue Dec 17 14:38:44 1996
+@@ -251,8 +251,7 @@
+ return (TCL_OK);
+ }
+ if (strcmp(argv[1], "addr") == 0) {
+- strcpy(wrk, InetNtoa(addr_));
+- tcl.result(wrk);
++ tcl.result(InetNtoa(addr_), TCL_DYNAMIC);
+ return (TCL_OK);
+ }
+ if (strcmp(argv[1], "srcid") == 0) {
+--- Tcl.cc.orig Tue Apr 2 20:53:27 1996
++++ Tcl.cc Tue Dec 17 15:45:30 1996
+@@ -162,6 +162,8 @@
+ Tcl& tcl = Tcl::instance();
+ if (!tcl.dark())
+ tcl.DeleteCommand(name_);
++ if (name_ != 0)
++ delete name_;
+ TclObject** p;
+ for (p = &all_; *p != this; p = &(*p)->next_)
+ ;
+@@ -197,8 +199,9 @@
+ void TclObject::setproc(const char* s)
+ {
+ Tcl& tcl = Tcl::instance();
+- if (name_ != 0 && !tcl.dark()) {
+- tcl.DeleteCommand(name_);
++ if (name_ != 0) {
++ if (!tcl.dark())
++ tcl.DeleteCommand(name_);
+ delete name_;
+ }
+ int n = strlen(s);
+--- decoder.cc.orig Wed Jun 26 17:28:40 1996
++++ decoder.cc Tue Dec 17 15:55:42 1996
+@@ -74,6 +74,8 @@
+
+ Decoder::~Decoder()
+ {
++ if (rvts_)
++ delete rvts_;
+ }
+
+ int Decoder::command(int argc, const char*const* argv)
+--- encoder-h261.cc.orig Mon Jul 22 13:12:53 1996
++++ encoder-h261.cc Tue Dec 17 16:01:47 1996
+@@ -118,6 +118,7 @@
+ void setq(int q);
+ protected:
+ H261Encoder(int ft);
++ ~H261Encoder();
+ int encode(const VideoFrame*, const u_int8_t *crvec);
+ int command(int argc, const char*const* argv);
+ void encode_blk(const short* blk, const char* lm);
+@@ -208,6 +209,16 @@
+ for (int q = 0; q < 32; ++q) {
+ llm_[q] = 0;
+ clm_[q] = 0;
++ }
++}
++
++H261Encoder::~H261Encoder()
++{
++ for (int q = 0; q < 32; ++q) {
++ if (llm_[q] != 0)
++ delete llm_[q];
++ if (clm_[q] != 0)
++ delete clm_[q];
+ }
+ }
+