Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 7 insertions, 2 deletions
-rw-r--r--badwolf.c9
diff --git a/badwolf.c b/badwolf.c
index d46c91c..74f6a7f 100644
--- a/badwolf.c
+++ b/badwolf.c
@@ -11,7 +11,7 @@
#include <glib/gi18n.h> /* _() and other internationalization/localization helpers */
#include <libsoup/soup.h> /* soup* */
#include <locale.h> /* LC_* */
-#include <stdio.h> /* fprintf() */
+#include <stdio.h> /* perror(), fprintf() */
#include <stdlib.h> /* malloc() */
const gchar *homepage = "https://hacktivis.me/projects/badwolf";
@@ -745,7 +745,12 @@ int
main(int argc, char *argv[])
{
// getting an abort if this one fails to alloc
- struct Window *window = g_malloc(sizeof(struct Window));
+ struct Window *window = malloc(sizeof(struct Window));
+ if(window == NULL)
+ {
+ perror("malloc");
+ return 1;
+ }
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, DATADIR "/locale");