Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2005:
[Freeciv-Dev] (PR#12165) duplicate tileset tags cause a memory leak
Home

[Freeciv-Dev] (PR#12165) duplicate tileset tags cause a memory leak

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12165) duplicate tileset tags cause a memory leak
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 7 Feb 2005 17:50:26 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12165 >

This is in 2.0 and 2.0.99.

The code is in tilespec.c:

         for (k = 0; k < num_tags; k++) {
       (void) hash_replace(sprite_hash, mystrdup(tags[k]), ss);
         }
       }

this leads to lots of leaked memory from the mystrdup call, when civ3gfx 
(which has many duplicate tags) is used.

I imagine this is a problem anywhere where hash_replace is used!

-jason





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12165) duplicate tileset tags cause a memory leak, Jason Short <=