~ubuntu-branches/ubuntu/raring/plymouth/raring

« back to all changes in this revision

Viewing changes to .pc/debug-fixes.patch/src/main.c

  • Committer: Steve Langasek
  • Date: 2012-04-15 08:26:52 UTC
  • Revision ID: steve.langasek@canonical.com-20120415082652-adf57pb7nuymubl4
* debian/patches/initramfsless-boot.patch: clean up our failure path when
  /dev/pts isn't available yet:
  - don't free a buffer that we might use again later
  - once we've created the session object, keep it around, instead of
    freeing it again and leaving a dangling reference to it in the loop
    exit handler list.
  it's not clear if this was working before, but it definitely hits an
  assert now.  LP: #981314.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1479
1479
     session = ply_terminal_session_new (NULL);
1480
1480
 
1481
1481
     ply_terminal_session_attach_to_event_loop (session, state->loop);
 
1482
     state->session = session;
1482
1483
   }
1483
1484
 else
1484
1485
   {
1493
1494
                                 (should_be_redirected? on_session_finished: NULL),
1494
1495
                                 -1, state))
1495
1496
    {
1496
 
      ply_save_errno ();
1497
 
      ply_terminal_session_free (session);
1498
 
      ply_buffer_free (state->boot_buffer);
1499
 
      state->boot_buffer = NULL;
1500
 
      ply_restore_errno ();
1501
 
 
1502
1497
      state->is_redirected = false;
1503
1498
      state->is_attached = false;
1504
1499
      return false;
1506
1501
 
1507
1502
  state->is_redirected = should_be_redirected;
1508
1503
  state->is_attached = true;
1509
 
  state->session = session;
1510
1504
 
1511
1505
  return true;
1512
1506
}