Index: uspace/lib/sif/src/sif.c
===================================================================
--- uspace/lib/sif/src/sif.c	(revision ee8d4d601987a29ae753bdf20ae64a1e84bcf074)
+++ uspace/lib/sif/src/sif.c	(revision 350ec74aaf36e89812dd2e151117f72652dcca45)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2018 Jiri Svoboda
+ * Copyright (c) 2023 Jiri Svoboda
  * All rights reserved.
  *
@@ -702,4 +702,5 @@
 {
 	char *str;
+	char *nstr;
 	size_t str_size;
 	size_t sidx;
@@ -739,9 +740,11 @@
 		if (sidx >= str_size) {
 			str_size *= 2;
-			str = realloc(str, str_size + 1);
-			if (str == NULL) {
+			nstr = realloc(str, str_size + 1);
+			if (nstr == NULL) {
 				rc = ENOMEM;
 				goto error;
 			}
+
+			str = nstr;
 		}
 
