Changeset 6c69d19 in mainline for uspace/lib/posix/stdio/scanf.c


Ignore:
Timestamp:
2011-07-25T20:34:17Z (13 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
00c2de63, c936c7f
Parents:
5889fc74 (diff), d542aad (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge libposix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/stdio/scanf.c

    r5889fc74 r6c69d19  
    303303        self->fetched = 0;
    304304        self->cursor = NULL;
    305         free(self->window);
    306         self->window = NULL;
     305        if (self->window) {
     306                free(self->window);
     307                self->window = NULL;
     308        }
    307309        self->window_size = 0;
    308310        self->state = _PROV_CONSTRUCTED;
     
    653655                                /* Update the cursor so it can be returned to the provider. */
    654656                                cur_borrowed += cur_updated - cur_limited;
    655                                 if (width != -1) {
     657                                if (width != -1 && cur_limited != NULL) {
    656658                                        /* Deallocate duplicated part of the cursor view. */
    657659                                        free(cur_limited);
     
    833835                                /* Update the cursor so it can be returned to the provider. */
    834836                                cur_borrowed += cur_updated - cur_limited;
    835                                 if (width != -1) {
     837                                if (width != -1 && cur_limited != NULL) {
    836838                                        /* Deallocate duplicated part of the cursor view. */
    837839                                        free(cur_limited);
Note: See TracChangeset for help on using the changeset viewer.