/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to dracut-module/password-agent.c

  • Committer: Teddy Hogeborn
  • Date: 2020-12-06 12:02:04 UTC
  • mto: This revision was merged to the branch mainline in revision 404.
  • Revision ID: teddy@recompile.se-20201206120204-pkx839mdn2x2v2m7
Minor code cleanup

* dracut-module/password-agent.c
  (test_send_password_to_socket_EMSGSIZE): Replace a free()/malloc()
  pair with single realloc() call.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5978
5978
      g_test_skip("Skipping EMSGSIZE test: Will not try 1GiB");
5979
5979
      return;
5980
5980
    }
5981
 
    free(message_buffer);
5982
 
    message_buffer = malloc(message_size);
 
5981
    message_buffer = realloc(message_buffer, message_size);
5983
5982
    if(message_buffer == NULL){
5984
5983
      g_test_skip("Skipping EMSGSIZE test");
5985
5984
      g_test_message("Failed to malloc() %" PRIuMAX " bytes",