Skip to content

Commit 7839f60

Browse files
authored
Merge pull request #376 from nexB/267-memory-leak
#267 Remove memory leak from license detection
2 parents ca640b9 + 151b9bb commit 7839f60

151 files changed

Lines changed: 1933 additions & 1617 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/licensedcode/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2015 nexB Inc. and others. All rights reserved.
2+
# Copyright (c) 2016 nexB Inc. and others. All rights reserved.
33
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
44
# The ScanCode software is licensed under the Apache License version 2.0.
55
# Data generated with ScanCode require an acknowledgment.
@@ -52,9 +52,6 @@
5252
MIN_MATCH_LENGTH = 4
5353
MIN_MATCH_HIGH_LENGTH = 3
5454

55-
# maximum number of non-matching tokens that can be skipped
56-
MAX_GAP_SKIP = 15
57-
5855
# maximum distance between two matches to merge
5956
MAX_DIST = 120
6057

src/licensedcode/cache.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ def get(self, query_run):
181181

182182
qrs = query_run.start
183183
qre = query_run.end
184-
qlbp = query_run.line_by_pos
185-
return [lm.rebase(qrs, qre, qlbp, MATCH_CACHE) for lm in cached]
184+
return [lm.rebase(qrs, qre, MATCH_CACHE) for lm in cached]
186185

187186
def put(self, query_run, matches):
188187
"""

src/licensedcode/data/licenses/day-spec.LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
[Day Specification License]
2+
3+
Day Management AG ("Licensor") is willing to license this specification
4+
to you ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED
5+
IN THIS LICENSE AGREEMENT ("Agreement"). Please read the terms and
6+
conditions of this Agreement carefully.
7+
18
Content Repository for JavaTM Technology API Specification ("Specification")
29
Version: 1.0
310
Status: FCS

src/licensedcode/data/licenses/tatu-ylonen.LICENSE

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
Tatu Ylonen License
22

3-
* Author: Tatu Ylonen <ylo@cs.hut.fi>
4-
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5-
* All rights reserved
6-
* Versions of malloc and friends that check their results, and never return
7-
* failure (they call fatal if they encounter an error).
8-
*
93
* As far as I am concerned, the code I have written for this software
104
* can be used freely for any purpose. Any derived versions of this
115
* software must be clearly marked as such, and if the derived work is

src/licensedcode/data/licenses/zlib.SPDX

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
licenses:
22
- 3pp-proprietary-08
3-
solid: yes
3+
minimum_score: 100
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
licenses:
22
- adobe-scl
3-
solid: yes
3+
minimum_score: 100
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
licenses:
22
- afl-2.1
33
- bsd-new
4-
solid: yes
4+
minimum_score: 100
55
license_choice: yes
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
licenses:
22
- apache-1.1
3-
solid: yes
3+
minimum_score: 100
44
notes: >
55
Notice found in http://apache.org/licenses/LICENSE-1.1
66
but it is really specific to an Apache Software Foundation component.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
licenses:
22
- apache-1.1
3-
solid: yes
3+
minimum_score: 100
44
notes: Old, original Apache 1.1 URL

0 commit comments

Comments
 (0)