]> git.street.me.uk Git - andy/viking.git/commitdiff
Ensure string value is copied.
authorRob Norris <rw_norris@hotmail.com>
Sat, 29 Apr 2017 15:31:00 +0000 (16:31 +0100)
committerRob Norris <rw_norris@hotmail.com>
Sat, 29 Apr 2017 16:43:41 +0000 (17:43 +0100)
Otherwise wrong memory is freed at program shutdown.

src/babel.c

index 29ce22fcc16c7031973d6d4bc97fb1cd703a27b8..ea86ae4f8a1c04ebc3d7d3d20782bc76c976412e 100644 (file)
@@ -672,7 +672,7 @@ void a_babel_post_init ()
       g_critical( "gpsbabel not found in PATH" );
   }
   else
-    gpsbabel_loc = (gchar*)gpsbabel;
+    gpsbabel_loc = g_strdup ( gpsbabel );
 
   // Unlikely to package unbuffer on Windows so ATM don't even bother trying
   // Highly unlikely unbuffer is available on a Windows system otherwise