Browse Source

fixed small memory issue (#666)

pull/667/head
Logan oos Even 4 years ago
committed by GitHub
parent
commit
1c1a9f5058
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/sn.c

2
src/sn.c

@ -79,6 +79,8 @@ static int load_allowed_sn_community (n2n_sn_t *sss) {
break; break;
} }
} }
// the loop above does not always determine correct 'len'
len = strlen(line);
// cut off any IP sub-network upfront // cut off any IP sub-network upfront
cmn_str = (char*)calloc(len + 1, sizeof(char)); cmn_str = (char*)calloc(len + 1, sizeof(char));

Loading…
Cancel
Save