remove useless conditional before free from dynamic linker path code
authorRich Felker <dalias@aerifal.cx>
Wed, 26 Jun 2013 14:51:36 +0000 (10:51 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 26 Jun 2013 14:51:36 +0000 (10:51 -0400)
src/ldso/dynlink.c

index eac07d9..d197473 100644 (file)
@@ -479,7 +479,7 @@ static struct dso *load_library(const char *name)
                                FILE *f = fopen(ETC_LDSO_PATH, "rbe");
                                if (f) {
                                        if (getdelim(&sys_path, (size_t[1]){0}, 0, f) <= 0) {
                                FILE *f = fopen(ETC_LDSO_PATH, "rbe");
                                if (f) {
                                        if (getdelim(&sys_path, (size_t[1]){0}, 0, f) <= 0) {
-                                               if (sys_path) free(sys_path);
+                                               free(sys_path);
                                                sys_path = "";
                                        }
                                        fclose(f);
                                                sys_path = "";
                                        }
                                        fclose(f);