Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/a76a36915c7d348582f905629fa0840a88b02edb
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/a76a36915c7d348582f905629fa0840a88b02edb
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/a76a36915c7d348582f905629fa0840a88b02edb

The branch, master has been updated
       via  a76a36915c7d348582f905629fa0840a88b02edb (commit)
      from  c4b8857789e3f79a2ae0f7abe108999bf323b01a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=a76a36915c7d348582f905629fa0840a88b02edb
commit a76a36915c7d348582f905629fa0840a88b02edb
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>

    Ensure the memory for the mem-handler interrupt is allocated

diff --git a/frontends/amiga/memory.c b/frontends/amiga/memory.c
index abf849d..880131a 100755
--- a/frontends/amiga/memory.c
+++ b/frontends/amiga/memory.c
@@ -74,6 +74,7 @@ static ASM ULONG ami_memory_handler(REG(a0, struct 
MemHandlerData *mhd), REG(a1,
 struct Interrupt *ami_memory_init(void)
 {
        struct Interrupt *memhandler = malloc(sizeof(struct Interrupt));
+       if(memhandler == NULL) return NULL; // we're screwed
 
        memhandler->is_Node.ln_Pri = 1;
        memhandler->is_Node.ln_Name = "NetSurf slab memory handler";
@@ -86,8 +87,10 @@ struct Interrupt *ami_memory_init(void)
 
 void ami_memory_fini(struct Interrupt *memhandler)
 {
-       RemMemHandler(memhandler);
-       free(memhandler);
+       if(memhandler != NULL) {
+               RemMemHandler(memhandler);
+               free(memhandler);
+       }
 }
 
 #endif


-----------------------------------------------------------------------

Summary of changes:
 frontends/amiga/memory.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/frontends/amiga/memory.c b/frontends/amiga/memory.c
index abf849d..880131a 100755
--- a/frontends/amiga/memory.c
+++ b/frontends/amiga/memory.c
@@ -74,6 +74,7 @@ static ASM ULONG ami_memory_handler(REG(a0, struct 
MemHandlerData *mhd), REG(a1,
 struct Interrupt *ami_memory_init(void)
 {
        struct Interrupt *memhandler = malloc(sizeof(struct Interrupt));
+       if(memhandler == NULL) return NULL; // we're screwed
 
        memhandler->is_Node.ln_Pri = 1;
        memhandler->is_Node.ln_Name = "NetSurf slab memory handler";
@@ -86,8 +87,10 @@ struct Interrupt *ami_memory_init(void)
 
 void ami_memory_fini(struct Interrupt *memhandler)
 {
-       RemMemHandler(memhandler);
-       free(memhandler);
+       if(memhandler != NULL) {
+               RemMemHandler(memhandler);
+               free(memhandler);
+       }
 }
 
 #endif


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to