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

« back to all changes in this revision

Viewing changes to 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:
1478
1478
     session = ply_terminal_session_new (NULL);
1479
1479
 
1480
1480
     ply_terminal_session_attach_to_event_loop (session, state->loop);
 
1481
     state->session = session;
1481
1482
   }
1482
1483
 else
1483
1484
   {
1492
1493
                                 (should_be_redirected? on_session_finished: NULL),
1493
1494
                                 -1, state))
1494
1495
    {
1495
 
      ply_save_errno ();
1496
 
      ply_terminal_session_free (session);
1497
 
      ply_buffer_free (state->boot_buffer);
1498
 
      state->boot_buffer = NULL;
1499
 
      ply_restore_errno ();
1500
 
 
1501
1496
      state->is_redirected = false;
1502
1497
      state->is_attached = false;
1503
1498
      return false;
1505
1500
 
1506
1501
  state->is_redirected = should_be_redirected;
1507
1502
  state->is_attached = true;
1508
 
  state->session = session;
1509
1503
 
1510
1504
  return true;
1511
1505
}