plugins/gaim-remote/remote-socket.c

changeset 10899
87d9aec5b72d
parent 10541
4de364fa79ae
--- a/plugins/gaim-remote/remote-socket.c	Tue May 03 04:40:53 2005 +0000
+++ b/plugins/gaim-remote/remote-socket.c	Thu May 05 13:09:28 2005 +0000
@@ -142,9 +142,9 @@
 	}
 
 	if (p->length) {
-		data = g_malloc(p->length);
+		data = g_try_malloc(p->length);
 
-		if ((read(fd, data, p->length)) != p->length) {
+		if ((data == NULL) || (read(fd, data, p->length)) != p->length) {
 			g_free(p);
 			return NULL;
 		}

mercurial