Changeset: 6a4f65c172e5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6a4f65c172e5
Modified Files:
        common/stream/stream.c
Branch: Jun2016
Log Message:

Check for validity of pointer before calling function.
This prevents a crash in interactive mclient on Windows when exiting.


diffs (16 lines):

diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -598,8 +598,10 @@ void
 close_stream(stream *s)
 {
        if (s) {
-               s->close(s);
-               s->destroy(s);
+               if (s->close)
+                       s->close(s);
+               if (s->destroy)
+                       s->destroy(s);
        }
 }
 
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to