Signed-off-by: Luka Perkov <luka@openwrt.org>
char *p = &line[len + 1];
char *t = strstr(p, " ");
char *p = &line[len + 1];
char *t = strstr(p, " ");
+ if (!t) {
+ fclose(fp);
*t = '\0';
point = p;
break;
*t = '\0';
point = p;
break;
while (fgets(line, sizeof(line), fp)) {
char *s, *t = strstr(line, " ");
while (fgets(line, sizeof(line), fp)) {
char *s, *t = strstr(line, " ");
+ if (!t) {
+ fclose(fp);
+ if (!s) {
+ fclose(fp);
*s = '\0';
if (!strcmp(t, mp)) {
*s = '\0';
if (!strcmp(t, mp)) {
char *p = &line[len + 1];
char *t = strstr(p, " ");
char *p = &line[len + 1];
char *t = strstr(p, " ");
+ if (!t) {
+ fclose(fp);
*t = '\0';
t++;
if (fs && strncmp(t, fs, strlen(fs))) {
*t = '\0';
t++;
if (fs && strncmp(t, fs, strlen(fs))) {
ERROR("block is mounted with wrong fs\n");
return NULL;
}
ERROR("block is mounted with wrong fs\n");
return NULL;
}