From: advielsack@gmail.com Date: Thu, 12 Jul 2012 19:30:19 +0000 (+0000) Subject: Fixed bug where gsconfig would crash after rediscovering X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=726ea5f77269e298dec89d49db2236b143f40bae;p=gsconf Fixed bug where gsconfig would crash after rediscovering git-svn-id: http://gsconf.googlecode.com/svn/trunk@10 11042eb7-4a36-49e9-8ab2-01d26d512705 --- diff --git a/gs105e.c b/gs105e.c index f28c110..9f0d807 100644 --- 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);