Patch for cppcheck error "Common realloc mistake"

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

 



Hello,

I had sent a simple proposed patch 21/08 (http://old.nabble.com/Patch-for-cppcheck-error-%22Common-realloc-mistake%22-to32305733.html)

Since I didn't get answers and I received an email about gimp-dev mailing list available, I wanted to propose this very simple patch again :

diff --git a/libgimpbase/gimpreloc.c b/libgimpbase/gimpreloc.c
index 7461bed..238797f 100644
--- a/libgimpbase/gimpreloc.c
+++ b/libgimpbase/gimpreloc.c
@@ -245,7 +245,7 @@ _br_find_exe_for_symbol (const void *symbol, GimpBinrelocInitError *error)
                  * then transform that into a pointer. */
                 if (address_string_len < len + 3) {
                         address_string_len = len + 3;
- address_string = (char *) g_try_realloc (address_string, address_string_len); + address_string = (char *) g_realloc (address_string, address_string_len);
                 }

                 memcpy (address_string, "0x", 2);

Julien.

PS : is there a Nabble interface for this mailing-list ?
_______________________________________________
gimp-developer-list mailing list
gimp-developer-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gimp-developer-list


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux