]> git.sur5r.net Git - gsconf/commitdiff
Fixed bug where gsconfig would crash after rediscovering
authoradvielsack@gmail.com <advielsack@gmail.com@11042eb7-4a36-49e9-8ab2-01d26d512705>
Thu, 12 Jul 2012 19:30:19 +0000 (19:30 +0000)
committeradvielsack@gmail.com <advielsack@gmail.com@11042eb7-4a36-49e9-8ab2-01d26d512705>
Thu, 12 Jul 2012 19:30:19 +0000 (19:30 +0000)
git-svn-id: http://gsconf.googlecode.com/svn/trunk@10 11042eb7-4a36-49e9-8ab2-01d26d512705

gs105e.c

index f28c110b792f863ba0c36a7b2af05a5a930ad126..9f0d8077c1719495efc83fc272b7c06132885801 100644 (file)
--- a/gs105e.c
+++ b/gs105e.c
@@ -437,8 +437,8 @@ void addDiscoveredDevice(int id) {
                 
         }        
         
-        printf("%p\n", ddev);
-        ddev->name = (char *)realloc(ddev->name, sizeof(char) * strlen(settings.name));
+        printf("%p\n", ddev->name);
+        ddev->name = (char *)malloc(sizeof(char) * strlen(settings.name));
         printf("DEBUG 1\n");
         memcpy(ddev->name, settings.name, strlen(settings.name) + 1);
         memcpy(ddev->mac, settings.mac, 6);