Overview
Comment: | Key Value Coding: Make sure free is always called
In theory, if -[UTF8String] would throw, this could leak. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
49ed0fa5ec301f4a1120f2e848734868 |
User & Date: | js on 2016-06-05 16:04:11 |
Other Links: | manifest | tags |
Context
2016-06-05
| ||
17:28 | Update Xcode project to recent changes check-in: 111c2e14b8 user: js tags: trunk | |
16:04 | Key Value Coding: Make sure free is always called check-in: 49ed0fa5ec user: js tags: trunk | |
16:00 | Key Value Coding: Add fallback to isFoo check-in: 10fbb20fd6 user: js tags: trunk | |
Changes
Modified src/OFObject+KeyValueCoding.m from [f4fafd457a] to [6d4c66aa16].
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | + - - - + + + - + - - - + + + + | if ((keyLength = [key UTF8StringLength]) < 1) return [self valueForUndefinedKey: key]; if ((name = malloc(keyLength + 3)) == NULL) @throw [OFOutOfMemoryException exceptionWithRequestedSize: keyLength + 3]; @try { |
︙ | |||
135 136 137 138 139 140 141 | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | + - - - + + + - + - - - + + + + | return; } if ((name = malloc(keyLength + 5)) == NULL) @throw [OFOutOfMemoryException exceptionWithRequestedSize: keyLength + 5]; @try { |
︙ |