Changeset a12f7f1 in mainline for uspace/lib/posix/stdio/scanf.c
- Timestamp:
- 2011-07-21T02:24:41Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cfbb5d18
- Parents:
- 94f8b81c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/stdio/scanf.c
r94f8b81c ra12f7f1 303 303 self->fetched = 0; 304 304 self->cursor = NULL; 305 free(self->window); 306 self->window = NULL; 305 if (self->window) { 306 free(self->window); 307 self->window = NULL; 308 } 307 309 self->window_size = 0; 308 310 self->state = _PROV_CONSTRUCTED; … … 653 655 /* Update the cursor so it can be returned to the provider. */ 654 656 cur_borrowed += cur_updated - cur_limited; 655 if (width != -1 ) {657 if (width != -1 && cur_limited != NULL) { 656 658 /* Deallocate duplicated part of the cursor view. */ 657 659 free(cur_limited); … … 833 835 /* Update the cursor so it can be returned to the provider. */ 834 836 cur_borrowed += cur_updated - cur_limited; 835 if (width != -1 ) {837 if (width != -1 && cur_limited != NULL) { 836 838 /* Deallocate duplicated part of the cursor view. */ 837 839 free(cur_limited);
Note:
See TracChangeset
for help on using the changeset viewer.